Update each property of Memorystore instances in a separate request#1297
Merged
modular-magician merged 1 commit intoterraform-google-modules:masterfrom Apr 23, 2026
Conversation
…#17166) [upstream:8bea1a5ef5441a6eab1f9980483cd8f0172f64fb] Signed-off-by: Modular Magician <magic-modules@google.com>
6664ec4
into
terraform-google-modules:master
2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes hashicorp/terraform-provider-google#20101
This PR updates the Memorystore
Instancedefinition to submit updates for multiple properties in multiple PATCH requests, one per property.The Memorystore API allows updating only one instance field per PATCH request, but the provider was sending all changed fields in a single request (e.g.,
updateMask=replicaCount,engineConfigs), causing updates to multiple fields to fail with:Each of the 11 mutable non-label properties now specifies
update_id,update_verb, andupdate_url(with a single-fieldupdateMaskquery parameter).I left
labelsin the main update path because it seemsKeyValueLabelsis handled specially as part of the provider's built-in handling for merging provider-level default labels with resource-level labels (viaeffective_labelsandterraform_labels). As the sole remaining field in the main update body, I think that should work, but let me know if I misinterpreted the behavior here.I also added a test to cover a multi-property update and confirmed it now works on a test GCP project.
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.
Derived from GoogleCloudPlatform/magic-modules#17166