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

Fix Spanner update when adding/removing autoscaling config #17033

Conversation

modular-magician
Copy link
Collaborator

Closes #16983

When adding/removing autoscaling_config in its entirety, set the top-level autoscalingConfig config in the update request's fieldMask.

Release Note Template for Downstream PRs (will be copied)

spanner: fixed error when adding `autoscaling_config` to an existing `google_spanner_instance`

Derived from GoogleCloudPlatform/magic-modules#9814

…#9814)

* Add reproducer test for error.

Creating a Spanner instance without auto-scaling and then updating it to
add auto-scaling should work, but currently doesn't.

* Fix `fieldMask` for spanner updates when enabling/disable autoscaling.

When adding/removing auto-scaling config wholesale, the API expects only
the top-level `autoscalingConfig` key to be listed in the `fieldMask`.
Listing sub-fields of the autoscaling config causes an error.

* Add tests for dropping auto-scaling.

Not sure if this was broken before, but makes sense to me that we should
test in both directions.

* Apply review feedback

* Fix indentation in template
* Rename test instances to match expected pattern
* Consolidate tests

* Fix name-too-long errors
[upstream:8f488115df8493669aae88a65b80a2fcb31d7557]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 8940912 into hashicorp:main Jan 17, 2024
1 check 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 17, 2024
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.

Error when updating existing google_spanner_instance to add autoscaling
1 participant