Skip to content

Commit 062bd5e

Browse files
unlimitedbitsGabriel Kanatschnig
andauthored
fix: Correct ConfigManagement hierarchyController definition (#861)
Co-authored-by: Gabriel Kanatschnig <[email protected]>
1 parent 18ad6aa commit 062bd5e

File tree

1 file changed

+1
-1
lines changed
  • modules/k8s-operator-crd-support

1 file changed

+1
-1
lines changed

modules/k8s-operator-crd-support/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ locals {
2222
manifest_path = local.should_download_manifest ? "${path.root}/.terraform/tmp/${var.project_id}-${var.cluster_name}/config-management-operator.yaml" : var.operator_path
2323
sync_branch_node = var.sync_branch != "" ? format("syncBranch: %s", var.sync_branch) : ""
2424
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))
25+
hierarchy_controller_map_node = var.hierarchy_controller == null ? "" : format("hierarchyController:\n %s", indent(4, replace(yamlencode(var.hierarchy_controller), "/((?:^|\n)[\\s-]*)\"([\\w-]+)\":/", "$1$2:")))
2626
source_format_node = var.source_format != "" ? format("sourceFormat: %s", var.source_format) : ""
2727
append_arg_use_existing_context_for_gatekeeper = var.use_existing_context ? "USE_EXISTING_CONTEXT_ARG" : ""
2828
}

0 commit comments

Comments
 (0)