fix: use snake_case in gateway update encoder for routing_mode - #18642
fix: use snake_case in gateway update encoder for routing_mode#18642vr-ibm wants to merge 2 commits into
Conversation
The update encoder was using d.Get("routingMode") (camelCase) which
returns nil from Terraform's schema. This overwrites the correctly-built
routingMode value with nil, so the API never receives routing_mode
updates for SECURE_WEB_GATEWAY resources.
Fixes hashicorp/terraform-provider-google#27893
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit c68121e: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 2 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 🔴 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. |
d.Get("routing_mode") returns "" when unset, which the API rejects
as an invalid enum. Only force-send when the field has a value.
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit c63f3eb: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 1 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
🟢 All tests passed! View the recording VCR build log or the debug logs folder for detailed results. |
Fixes hashicorp/terraform-provider-google#27893
Fixes
d.Get("routingMode")→d.Get("routing_mode")in the Gateway update encoder template. The camelCase key returnsnilfrom Terraform's schema, which overwrites the correctly-built value and silently dropsrouting_modeupdates for SECURE_WEB_GATEWAY resources.Details
mmv1/templates/terraform/update_encoder/network_services_gateway.go.tmpld.Get("routingMode")→d.Get("routing_mode")so the field value is correctly force-sent on updateRelease Note Template for Downstream PRs (will be copied)