diff --git a/.changelog/4674.txt b/.changelog/4674.txt new file mode 100644 index 0000000000..c4f4ba1cf2 --- /dev/null +++ b/.changelog/4674.txt @@ -0,0 +1,3 @@ +```release-note:bug +container: fixed a bug that allowed specifying `node_config` on `google_container_cluster` when autopilot is used +``` diff --git a/google-beta/resource_container_cluster.go b/google-beta/resource_container_cluster.go index b1fded77d4..2404e5fc23 100644 --- a/google-beta/resource_container_cluster.go +++ b/google-beta/resource_container_cluster.go @@ -80,6 +80,8 @@ func clusterSchemaNodeConfig() *schema.Schema { changeFieldSchemaToForceNew(sch) } } + // Autopilot is only applicable for container cluster + nodeConfigSch.ConflictsWith = []string{"enable_autopilot"} return nodeConfigSch }