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 #9058

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 <[email protected]>
@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 fce141a into hashicorp:main Jan 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant