diff --git a/docs/upgrading_to_v13.0.md b/docs/upgrading_to_v13.0.md index dd8dd9d43..daeb5a3fe 100644 --- a/docs/upgrading_to_v13.0.md +++ b/docs/upgrading_to_v13.0.md @@ -28,3 +28,10 @@ module. This release adapts to this requirement. + version = "~> 13.0" } ``` + +### ACM submodule `local_file` removed + +[ACM submodule](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/tree/master/modules/acm) no longer creates a local file called `operator_cr.yaml`. +The yaml contents are rendered dynamically and passed via STDIN which fixes errors due to `operator_cr.yaml` file not being present between ephemeral pipeline runs. + +This is destructive and will result in deletion and recreation of the ACM operator. diff --git a/modules/k8s-operator-crd-support/main.tf b/modules/k8s-operator-crd-support/main.tf index 334b0d23b..3c4a2ff91 100644 --- a/modules/k8s-operator-crd-support/main.tf +++ b/modules/k8s-operator-crd-support/main.tf @@ -91,11 +91,6 @@ data "template_file" "k8sop_config" { } } -resource "local_file" "operator_cr" { - content = data.template_file.k8sop_config.rendered - filename = "${path.module}/${var.project_id}-${var.cluster_name}/operator_cr.yaml" -} - module "k8sop_config" { source = "terraform-google-modules/gcloud/google//modules/kubectl-wrapper" version = "~> 2.0.2" @@ -103,11 +98,11 @@ module "k8sop_config" { cluster_name = var.cluster_name cluster_location = var.location project_id = var.project_id - create_cmd_triggers = { configmanagement = local_file.operator_cr.content } + create_cmd_triggers = { configmanagement = data.template_file.k8sop_config.rendered } service_account_key_file = var.service_account_key_file - kubectl_create_command = "kubectl apply -f ${local_file.operator_cr.filename}" - kubectl_destroy_command = "kubectl delete -f ${local_file.operator_cr.filename}" + kubectl_create_command = "kubectl apply -f - <