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

Update google_sql_database and google_sql_user to not do Read actions when instance is not active #8441

Conversation

modular-magician
Copy link
Collaborator

This pull request addresses issue hashicorp/terraform-provider-google#7810. If the activation policy is not ALWAYS i.e. the instance is not active, return from the get resource method of "user" and "database". In the API layer if the activation policy is not set the ALWAYS then get resource will throw an error. To avoid breaking terraform plan, updating the getter method to avoid the error during refresh.

With these changes, terraform plan and terraform apply will succeed. If the customer try to update/delete the resource, it will still throw exception as it is not supported for inactive resources.

Release Note Template for Downstream PRs (will be copied)

sql: updated `google_sql_database` and `google_sql_user` so they don't perform Read operations if their associated `google_sql_database_instance` has `activation_policy` set to "NEVER". This avoids triggering API errors while the instance is unavailable.

Derived from GoogleCloudPlatform/magic-modules#11866

…ions when instance is not active (#11866)

Co-authored-by: Sarah French <[email protected]>

[upstream:fa2e68e34f9b8cc68d8245cc307741fd601beb3d]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician merged commit 6814d53 into hashicorp:main Oct 17, 2024
2 checks passed
@modular-magician modular-magician deleted the downstream-pr-fa2e68e34f9b8cc68d8245cc307741fd601beb3d branch November 16, 2024 03:51
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