Skip to content

Add immutable property to Gateway resource fields - #18625

Merged
SirGitsalot merged 1 commit into
GoogleCloudPlatform:mainfrom
JamesDuncanNz:patch-2
Aug 13, 2026
Merged

Add immutable property to Gateway resource fields#18625
SirGitsalot merged 1 commit into
GoogleCloudPlatform:mainfrom
JamesDuncanNz:patch-2

Conversation

@JamesDuncanNz

Copy link
Copy Markdown
Contributor

Description

Mark name and location parameters as immutable: true on Gateway.

Previously, immutable: true was missing on the URL parameters name and location in mmv1/products/networkservices/Gateway.yaml. As a result, the generated Terraform schema did not have ForceNew: true, causing Terraform to erroneously plan an in-place update when either field was changed. During apply, this resulted in an invalid PATCH request to the new resource name/location endpoint and failed on subsequent state read with:

Error: Provider produced inconsistent result after apply
Root object was present, but now absent.

Adding immutable: true ensures Terraform correctly plans a destroy-and-recreate (ForceNew) when name or location is changed.

Release Note Template for Downstream PRs (will be copied)

networkservices: fixed `google_network_services_gateway` to force replacement (`ForceNew`) when `name` or `location` is modified

Added 'immutable' property to 'name' and 'location' fields in Gateway.yaml.
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@SirGitsalot, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician

modular-magician commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

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

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 2 insertions(+)
google-beta provider View Diff 1 file changed, 2 insertions(+)
terraform-google-conversion View Diff 1 file changed, 2 insertions(+)

Test report

Analytics

Total Tests Passed Skipped Affected
102 100 2 0
Affected Service Packages
  • networkservices

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

@JamesDuncanNz, @SirGitsalot VCR tests complete for 6751f35!

@SirGitsalot

Copy link
Copy Markdown
Member

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.

3 participants