Skip to content

Commit e53a9ba

Browse files
authored
create unique dirs for manifests (terraform-google-modules#647)
1 parent 7fc3b48 commit e53a9ba

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ locals {
1919
private_key = var.create_ssh_key && var.ssh_auth_key == null ? tls_private_key.k8sop_creds[0].private_key_pem : var.ssh_auth_key
2020
k8sop_creds_secret_key = var.secret_type == "cookiefile" ? "cookie_file" : var.secret_type
2121
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
22+
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) : ""
2525
hierarchy_controller_map_node = var.hierarchy_controller == null ? "" : format("hierarchy_controller:\n %s", yamlencode(var.hierarchy_controller))
@@ -92,7 +92,7 @@ data "template_file" "k8sop_config" {
9292

9393
resource "local_file" "operator_cr" {
9494
content = data.template_file.k8sop_config.rendered
95-
filename = "${path.module}/operator_cr.yaml"
95+
filename = "${path.module}/${var.project_id}-${var.cluster_name}/operator_cr.yaml"
9696
}
9797

9898
module "k8sop_config" {

0 commit comments

Comments
 (0)