Fix: Include connection_limit in compute_service_attachment hash#17677
Fix: Include connection_limit in compute_service_attachment hash#17677haixin-huang wants to merge 3 commits into
Conversation
|
Googlers: For automatic test runs see go/terraform-auto-test-runs. @slevenick, 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. |
|
Sorry, I won't have time to review this PR today and will be OOO for a week. Rotating a new reviewer @modular-magician reassign-reviewer |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 733a059: 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. @haixin-huang, @slevenick VCR tests complete for 733a059! |
Description
This PR fixes a bug in the
google_compute_service_attachmentresource where modifications to theconnection_limitfield within theconsumer_accept_listsblock would not trigger a Terraform update.The root cause was that the internal hash function
computeServiceAttachmentConsumerAcceptListsHashonly incorporatedproject_id_or_numandnetwork_url. Becauseconsumer_accept_listsis a Set, Terraform uses this hash to identify if an entry has changed. By omitting theconnection_limit, Terraform would incorrectly conclude "No changes" when only that field was modified.This change adds
connection_limitto the hashing buffer in the Magic Modules template. An automated acceptance test has been added to verify that limit updates are now correctly detected and applied in-place via aPATCHrequest.Fixes: hashicorp/terraform-provider-google#27513
Release Note Template for Downstream PRs (will be copied)