You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a bucket & then running terraform destroy the bucket will get deleted.
I would like to prevent the bucket from getting destroyed, even tho everything else (user, policy, ...) are getting destroyed. Sadly this is not possible with terraforms prevent_destroy lifecycle option.
So adding a prevent_destroy option to the bucket resource would be sufficient.
Steps to Reproduce
terraform apply (creates bucket)
terraform destroy (destroyes bucket)
Expected behavior: Bucket gets destoyed
Wanted / Optional behavior: Bucket doesn't get destroyed, but everything else
The text was updated successfully, but these errors were encountered:
Hi, @Nold360. Thanks for sharing! Can you open a PR with the change you described? That would help a lot, considering maintainers are mostly unavailable these days.
We're also looking for more people to help maintain the provider, in case you're interested!
$ terraform destroy -target minio_s3_bucket.test
minio_s3_bucket.test3: Refreshing state... [id=test]
╷
│ Warning: Resource targeting is in effect
│
│ You are creating a plan with the -target option, which means that the result of this plan may not represent all of the changes requested by the current
│ configuration.
│
│ The -target option is not for routine use, and is provided only for exceptional situations such as recovering from errors or mistakes, or when Terraform
│ specifically suggests to use it as part of an error message.
╵
╷
│ Error: Instance cannot be destroyed
│
│ on test.tf line 5:
│ 5: resource "minio_s3_bucket" "test" {
│
│ Resource minio_s3_bucket.test has lifecycle.prevent_destroy set, but the plan calls for this resource to be destroyed. To avoid this error and continue with the
│ plan, either disable lifecycle.prevent_destroy or reduce the scope of the plan using the -target flag.
Description
When creating a bucket & then running
terraform destroy
the bucket will get deleted.I would like to prevent the bucket from getting destroyed, even tho everything else (user, policy, ...) are getting destroyed. Sadly this is not possible with terraforms
prevent_destroy
lifecycle option.So adding a
prevent_destroy
option to the bucket resource would be sufficient.Steps to Reproduce
Expected behavior: Bucket gets destoyed
Wanted / Optional behavior: Bucket doesn't get destroyed, but everything else
The text was updated successfully, but these errors were encountered: