From 1a747bc8e4b0b6c2e434e37f82d37695ce05b7c7 Mon Sep 17 00:00:00 2001 From: Dzmitry Pasiukevich Date: Tue, 15 Aug 2023 18:49:53 +0200 Subject: [PATCH] Ignore dns_config changes for Autopilot clusters Autopilot does not allow to modify dns_config. Recently, in Autopilot the default dns_config has changed to be: ``` dns_config { cluster_dns = "CLOUD_DNS" cluster_dns_domain = "cluster.local" cluster_dns_scope = "CLUSTER_SCOPE" } ``` This breaks Autopilot customers as the terraform tries to converge dns_config back to null. --- .../services/container/resource_container_cluster.go.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb b/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb index 720c614729e1..d82457bd7b9d 100644 --- a/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb +++ b/mmv1/third_party/terraform/services/container/resource_container_cluster.go.erb @@ -1976,6 +1976,7 @@ func ResourceContainerCluster() *schema.Resource { Optional: true, MaxItems: 1, ForceNew: true, + DiffSuppressFunc: suppressDiffForAutopilot, Description: `Configuration for Cloud DNS for Kubernetes Engine.`, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{