|
15 | 15 | */ |
16 | 16 |
|
17 | 17 | locals { |
18 | | - cluster_endpoint = "https://${var.cluster_endpoint}" |
19 | | - private_key = var.create_ssh_key && var.ssh_auth_key == null ? tls_private_key.k8sop_creds[0].private_key_pem : var.ssh_auth_key |
20 | | - k8sop_creds_secret_key = var.secret_type == "cookiefile" ? "cookie_file" : var.secret_type |
21 | | - should_download_manifest = var.operator_path == null ? true : false |
22 | | - manifest_path = local.should_download_manifest ? "${path.root}/.terraform/tmp/config-management-operator.yaml" : var.operator_path |
23 | | - sync_branch_node = var.sync_branch != "" ? format("syncBranch: %s", var.sync_branch) : "" |
24 | | - policy_dir_node = var.policy_dir != "" ? format("policyDir: %s", var.policy_dir) : "" |
| 18 | + cluster_endpoint = "https://${var.cluster_endpoint}" |
| 19 | + private_key = var.create_ssh_key && var.ssh_auth_key == null ? tls_private_key.k8sop_creds[0].private_key_pem : var.ssh_auth_key |
| 20 | + k8sop_creds_secret_key = var.secret_type == "cookiefile" ? "cookie_file" : var.secret_type |
| 21 | + should_download_manifest = var.operator_path == null ? true : false |
| 22 | + manifest_path = local.should_download_manifest ? "${path.root}/.terraform/tmp/config-management-operator.yaml" : var.operator_path |
| 23 | + sync_branch_node = var.sync_branch != "" ? format("syncBranch: %s", var.sync_branch) : "" |
| 24 | + policy_dir_node = var.policy_dir != "" ? format("policyDir: %s", var.policy_dir) : "" |
| 25 | + hierarchy_controller_map_node = var.hierarchy_controller == null ? "" : format("hierarchy_controller:\n %s", yamlencode(var.hierarchy_controller)) |
| 26 | + source_format_node = var.source_format != "" ? format("sourceFormat: %s", var.source_format) : "" |
25 | 27 | } |
26 | 28 |
|
27 | 29 | module "k8sop_manifest" { |
@@ -75,13 +77,16 @@ data "template_file" "k8sop_config" { |
75 | 77 |
|
76 | 78 | template = file(var.operator_cr_template_path) |
77 | 79 | vars = { |
78 | | - cluster_name = var.cluster_name |
79 | | - sync_repo = var.sync_repo |
80 | | - sync_branch_node = local.sync_branch_node |
81 | | - policy_dir_node = local.policy_dir_node |
82 | | - secret_type = var.create_ssh_key ? "ssh" : var.secret_type |
83 | | - enable_policy_controller = var.enable_policy_controller ? "true" : "false" |
84 | | - install_template_library = var.install_template_library ? "true" : "false" |
| 80 | + cluster_name = var.cluster_name |
| 81 | + sync_repo = var.sync_repo |
| 82 | + sync_branch_node = local.sync_branch_node |
| 83 | + policy_dir_node = local.policy_dir_node |
| 84 | + secret_type = var.create_ssh_key ? "ssh" : var.secret_type |
| 85 | + enable_policy_controller = var.enable_policy_controller ? "true" : "false" |
| 86 | + install_template_library = var.install_template_library ? "true" : "false" |
| 87 | + source_format_node = local.source_format_node |
| 88 | + hierarchy_controller_map_node = local.hierarchy_controller_map_node |
| 89 | + enable_log_denies = var.enable_log_denies |
85 | 90 | } |
86 | 91 | } |
87 | 92 |
|
|
0 commit comments