fix: wrap API-unordered TypeList attrs in toset() to prevent perpetual diffs#2607
fix: wrap API-unordered TypeList attrs in toset() to prevent perpetual diffs#2607cblecker wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates various GKE cluster and node pool Terraform configurations to wrap list-based attributes—such as enable_components, oauth_scopes, tags, and event_type—with the toset() function. This ensures these attributes are treated as sets, preventing potential ordering issues or duplicate values. As there are no review comments provided, I have no feedback to offer.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
1c1cb95 to
67df17f
Compare
…l diffs Several GKE resource attributes are modeled as TypeList in the Terraform provider but the GKE API returns items in arbitrary order, causing perpetual no-op diffs on every plan. Wrap each value in toset() so Terraform treats them as order-insensitive. Affected attributes: - monitoring_config.enable_components - logging_config.enable_components - notification_config.filter.event_type - node_config.tags - node_pool_auto_config.network_tags.tags - cluster_autoscaling.auto_provisioning_defaults.oauth_scopes Assisted-by: Claude:claude-opus-4-6
67df17f to
aae2782
Compare
|
@apeabody sorry for the direct ping, but I'm wondering what the next steps might be to get this reviewed. thank you! |
|
/gcbrun |
Summary
TypeListin the Terraform provider, but the GKE API returns items in arbitrary order. This causes perpetual no-op diffs on everyterraform plan.toset()so Terraform treats them as order-insensitive, eliminating the spurious diffs.autogen/main/cluster.tf.tmpl) and regenerates all modulecluster.tffiles, plus hand-edits the three non-generated gke module files.Affected attributes
monitoring_config.enable_componentsresource_container_cluster.gologging_config.enable_componentsresource_container_cluster.gonotification_config.filter.event_typeresource_container_cluster.gonode_config.tagsnode_config.gonode_pool_auto_config.network_tags.tagsresource_container_cluster.gocluster_autoscaling.auto_provisioning_defaults.oauth_scopesresource_container_cluster.goAttributes already
TypeSetin the provider (no change needed):node_config.oauth_scopes,enable_k8s_beta_apis.enabled_apis.Test plan
terraform validatepasses against an example configurationterraform planno longer shows perpetual diffs for the affected attributesmake generateproduces no additional changes beyond those in this PR