Fix: google_service_networking_connection perma-diff on reserved_peering_ranges#16191
Fix: google_service_networking_connection perma-diff on reserved_peering_ranges#16191SCSAndre wants to merge 10 commits intoGoogleCloudPlatform:mainfrom
Conversation
…ompute_security_policy This change promotes the request_body_inspection_size field from Beta to GA in the google_compute_security_policy resource. The GA Compute API (v1) now supports this field with values: 8KB, 16KB, 32KB, 48KB, and 64KB for WAF request body inspection configuration. Changes: - Removed version guards from schema definition - Removed version guards from expand/flatten functions - Updated ForceSendFields to include field for all versions - Removed [Beta] marker from documentation - Enabled tests for GA provider ```release-note:enhancement compute: promoted `request_body_inspection_size` to GA in `google_compute_security_policy` ```
|
Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: For automatic test runs see go/terraform-auto-test-runs. @shuyama1, 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. |
0153735 to
5277d17
Compare
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Breaking Change(s) DetectedThe following breaking change(s) were detected within your pull request.
If you believe this detection to be incorrect please raise the concern with your reviewer. |
Tests analyticsTotal tests: 9 Click here to see the affected service packages
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
|
shuyama1
left a comment
There was a problem hiding this comment.
Thanks for the fix. It seems reasonable, but changing from list to set is a breaking change and needs to wait until the next major release
|
Hey @shuyama1, I thought it would be a minor release, considering the documentation: |
|
But in the opposite direction the documentation (https://googlecloudplatform.github.io/magic-modules/breaking-changes/breaking-changes/#field-level-breaking-changes) states that the same modification can be an example of a breaking change. "Field-level breaking changes: . Removing or renaming a field |
|
@shuyama1 maybe I could try to solve it using a DiffSuppressFunc? |
shuyama1
left a comment
There was a problem hiding this comment.
Thanks for looking into the docs!
My understanding is that the API preserves the order of the list as sent (evidenced by the fact mentioned in the GH issue that static lists work fine without diffs). Therefore, implementing this as a List is technically correct behavior.
Changing from List to Set is a breaking change because it breaks index-based interpolations. We can only make this change in a minor release if the API returns items in an unpredictable order (which would make index references unreliable anyway), but that seems not the case here.
- Updated resource_service_networking_connection.go - Modified resource_service_networking_connection_meta.yaml - Resolves connection reordering permadiff issue
5277d17 to
486f2dd
Compare
…ecurity_policy_test.go.tmpl
…ecurity_policy_meta.yaml.tmpl
…ecurity_policy.go.tmpl
…icy.html.markdown
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 9 Click here to see the affected service packages
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
|
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
|
Closing this PR to reopen with a clean branch that contains only the relevant commits. |
|
Closed in favor of clean PR: #16259 |
Description
Fixes #20398
This PR resolves a perma-diff issue in
google_service_networking_connectionwhere the order ofreserved_peering_rangescaused Terraform to detect changes during every plan, even if the set of ranges remained identical.Changes
TestAccServiceNetworkingConnection_reordertoresource_service_networking_connection_test.goto verify that changing the order of ranges does not trigger an update.Breaking Change Note
This change utilizes DiffSuppressFunc on the existing TypeList schema rather than converting to TypeSet.
Verification
I have verified this locally by running the new acceptance test:
make testacc TEST=./google/services/servicenetworking TESTARGS='-run TestAccServiceNetworkingConnection_reorder'Result: PASS