Skip to content

container: fix ignore_node_count_changes flattener permadiff - #18453

Merged
c2thorn merged 1 commit into
GoogleCloudPlatform:mainfrom
c2thorn:fix-gke-cluster-ignore-node-count-flattener
Jul 30, 2026
Merged

container: fix ignore_node_count_changes flattener permadiff #18453
c2thorn merged 1 commit into
GoogleCloudPlatform:mainfrom
c2thorn:fix-gke-cluster-ignore-node-count-flattener

Conversation

@c2thorn

@c2thorn c2thorn commented Jul 29, 2026

Copy link
Copy Markdown
Member

Fixes hashicorp/terraform-provider-google#27946
Splits #18397

The failing test was caused by a real permadiff where the ignore_node_count_changes flag was not persisted in google_container_cluster.node_pool.

Unlike top-level fields in google_container_node_pool which automatically persist their state in ResourceData during Read, unset nested fields in google_container_cluster.node_pool blocks get nulled out during Read.

To resolve the permadiff and fix the test, this PR:

  1. Explicitly maps ignore_node_count_changes from ResourceData inside GKE's flattenNodePool using the block prefix.
  2. Adds node_pool.0.managed_instance_group_urls to ImportStateVerifyIgnore in TestAccContainerCluster_regionalWithNodePool. Since virtual fields are not loaded during import, ignore_node_count_changes defaults to false and the API populates managed_instance_group_urls, causing an import verify diff.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

container: fixed a permadiff where `ignore_node_count_changes` was not persisted in `google_container_cluster.node_pool`

…e_container_cluster

Fixes hashicorp/terraform-provider-google#27946

This PR fixes a plan-time permadiff where ignore_node_count_changes was not persisted in the inline node_pool blocks of google_container_cluster in flattenNodePool. Also adds node_pool.0.managed_instance_group_urls to ImportStateVerifyIgnore in TestAccContainerCluster_regionalWithNodePool with an adjacent comment explaining why it is required on import.

```release-note:bug
container: fixed a plan-time permadiff where `ignore_node_count_changes` was not persisted in the inline `node_pool` blocks of `google_container_cluster`
```
@modular-magician

modular-magician commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit e3a0545:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 3 files changed, 13 insertions(+), 4 deletions(-)
google-beta provider View Diff 3 files changed, 13 insertions(+), 4 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
320 305 15 0
Affected Service Packages
  • container

Learn how VCR tests work


Step 1: Replaying Mode

🟢 All tests passed in Replaying mode! No Recording was needed.

View the replaying VCR build log

@c2thorn VCR tests complete for e3a0545!

@c2thorn
c2thorn added this pull request to the merge queue Jul 30, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 72bfc9b Jul 30, 2026
31 checks passed
@c2thorn
c2thorn deleted the fix-gke-cluster-ignore-node-count-flattener branch July 30, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing test(s): TestAccContainerCluster_regionalWithNodePool

3 participants