[8.0.0] container: extend google_container_node_pool name_prefix max length to 31 - #18477
Conversation
…length to 31 Fixes hashicorp/terraform-provider-google#8261 by using ReducedPrefixedUniqueId for name_prefix > 14 characters.
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 6fb0aff: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportImportant Manual Verification Required VCR cannot automatically execute the following tests added in this PR. Please verify them manually: 🔴 TestAccContainerNodePool_namePrefix_long Analytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Manual Verification Required: New tests were added that are skipped in presubmit tests. See the "Manual Verification Required" section at the top for details. 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. |
What changed
expandNodePoolinresource_container_node_pool.go.tmplto usetpgresource.ReducedPrefixedUniqueId(p)(appending 9 characters) instead ofid.PrefixedUniqueId(p)(appending 26 characters) whenlen(name_prefix) > 14.ValidateFuncto"name_prefix"inschemaNodePoolcapping maximum prefix length at 31 characters (31 + 9 = 40).TestAccContainerNodePool_namePrefix_longto verify thatname_prefixvalues longer than 14 characters provision successfully.container_node_pool.html.markdownresource documentation and the v8.0.0 Upgrade Guide (version_8_upgrade.html.markdown).Why
Fixes hashicorp/terraform-provider-google#8261. Previously, any
name_prefixlonger than 14 characters combined with the standard 26-character UUID suffix exceeded GKE's 40-character limit forNodePool.name, failing at apply time with HTTP 400. Following the precedent of compute instance templates (PR #11448), switching to the 9-character shortened suffix for prefixes> 14extends the maximum allowedname_prefixlength from 14 to 31 characters.Verification
TestAccContainerNodePool_namePrefix_long(len = 18) against live GKE API; PASSED (HTTP 200 OK, generated name length 27<= 40).TestAccContainerNodePool_namePrefix(len = 6) withRELEASE_DIFF=true; PASSED with 0 plan diffs (No changes), confirming zero drift or recreation when upgrading existing7.xresources to8.0.0.