Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add etags to acm_service_perimeter_resource #20910

Conversation

modular-magician
Copy link
Collaborator

Important

This PR is dependent on #12735. I'd appreciate it if we can try to get both of these in the end of Tuesday cut off for next weeks release. Thanks!

The acm_service_perimeter_resource is an item in a list (like a project in a list of projects). Since there is no API for "add item to list", terraform actually makes a GET then PATCH to get the current list, merge them, then send the combined list back to the API.

This GET-PATCH pattern can override data when concurrent requests are sent. So, we're trying to add etags to block requests that can result in data loss. Previously, I added the new post_read custom code hook so we can retrieve the etag.

I've tested this locally and I can see the etags being sent in the PATCH requests.

Please let me know if you have any questions.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

accesscontextmanager: added `etag` to `google_access_context_manager_service_perimeter_resource` to prevent overriding list of resources

Derived from GoogleCloudPlatform/magic-modules#12736

[upstream:0fcf74e7eb30d982aaead225987fc0ca71495724]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician requested a review from a team as a code owner January 14, 2025 20:04
@modular-magician modular-magician merged commit 1884b7e into hashicorp:main Jan 14, 2025
4 checks passed
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant