Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

container: fix updates for node_config.gcfs_config and make optional #2816

Conversation

modular-magician
Copy link
Collaborator

Recent changes introduced a couple of issues with node_config.gcfs_config:

  • Perrmadiff when the cluster was created with an older version of the provider (and in the case of older provider versions, force replacement of the nodepool) because of the attribute being required and not computed.
  • Lack of support for updating the field in place once initially set. While having force replacement of the node pool as existed before #11553 was one way to accomplish this, that fix didn't include the bits to update the node pool in place.
  • Handle updates properly for node_config.gcfs_config
  • Make node_config.gcfs_config optional and computed
  • Add tests to make sure we test the case where it's defined in google_container_cluster.node_config, as well as testing updates for both that and the google_container_node_pool resource.
  • Some minor fixes to spacing / formatting (to fix incorrect hard / soft tabs)

Fixes hashicorp/terraform-provider-google#19482
Follow up to #11553

Possible fix for terraform-google-modules/terraform-google-kubernetes-engine#2100

Let me know if there are potential negative effects from having the only item in the block be optional and computed. I have tested creating a cluster with an empty node_config.gcfs_config block, as well as later enabling it from that state, so I don't think having it be optional and the only item within that nested block will be an issue.

Might need to do a custom expand function or some more complicated code for the update case if more elements are added to the subblock, but this seems to work in my testing.

Release Note Template for Downstream PRs (will be copied)

container: fixed the in-place update for `node_config.gcfs_config` in `google_container_cluster` and `google_container_node_pool`
container: fixed a permadiff on `node_config.gcfs_config` in `google_container_cluster` and `google_container_node_pool`

Derived from GoogleCloudPlatform/magic-modules#11717

…l (#11717)

[upstream:20ac9f9559b3c12d6d637ff4e5f46f029d86997d]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician requested a review from a team as a code owner September 17, 2024 21:49
@modular-magician modular-magician requested review from roaks3 and removed request for a team September 17, 2024 21:49
@modular-magician modular-magician merged commit 93a390c into GoogleCloudPlatform:main Sep 17, 2024
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updates failing and not detecting false value for node.config.gcfs_config.enabled
1 participant