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 force_destroy field to google_bigtable_instance resource #18291

Conversation

modular-magician
Copy link
Collaborator

Closes #18194

Background

If a user tries to delete a bigtable instance that contains backups they will experience an API error saying deletion cannot happen due to backups.

There currently isn't a way to address this through Terraform; bigtable backups are not supported by the provider, so users will need to manually delete backups to unblock Terraform.

This PR adds a force_destroy field that will delete all backups when the instance is being deleted. This behaviour is opt-in, so there's no risk of unintentional deletion of backups. It copies some existing code from the force_destroy field on google_spanner_instance.

Testing

The acceptance test in this PR uses the http provider to make a backup by directly interacting with the API.

If/when backups are supported by the provider the test should be refactored.

Release Note Template for Downstream PRs (will be copied)

bigtable: added force_destroy field to `google_bigtable_instance` resource. This will force delete any backups present in the instance and allow the instance to be deleted.

O

Derived from GoogleCloudPlatform/magic-modules#10799

…rp#10799)

[upstream:bf05ed0325f5611d5421163b032cb34fd537d387]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician merged commit 6a64b14 into hashicorp:main May 31, 2024
4 checks passed
Copy link

github-actions bot commented Jul 1, 2024

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 Jul 1, 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.

BigTable: add force_destroy to destroy all user backups and BigTable instance together
1 participant