container: fix in-place updates for node_config.containerd_config
#20112
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It appears that in-place updates were never implemented for
node_config.containerd_config
, when contained within eithergoogle_container_cluster
orgoogle_container_node_pool
Fixes #19056
Related to #19225 (already closed / fixed)
The actual implementation is pretty simple, and is basically copy / paste from other fields.
The adjustments to existing tests are a little trickier to parse out.
Basically, the existing tests for both
google_container_cluster
andgoogle_container_node_pool
mostly coverednode_config_defaults
(maybe because that's the only one updates worked for), and didn't cover updates innode_config
. In at least one case, the same test was used for all ofnode_config_defaults
,node_pool.node_config
, andnode_config
, and I've mostly preserved that, just adjusting the order. Note that in at least one case, that will likely require recreating the entire cluster and / or its node-pools; I've moved that test (namednode_pool {}
block ingoogle_container_cluster
) to be the last test, and attempted to add some comments.Another approach would be to split out the tests of
node_config_defaults
,node_pool.node_config
, andnode_config
.Release Note Template for Downstream PRs (will be copied)
Derived from GoogleCloudPlatform/magic-modules#12135