【发布时间】:2021-02-04 09:41:00
【问题描述】:
我目前正在尝试销毁工作区,我知道有些存储桶应用了“请勿销毁”类型标签,所以当我第一次运行 terraform destroy 时,我得到了 @987654322 @ 两个桶的错误:
Resource module.xxx.aws_s3_bucket.xxx_bucket 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.
所以我导航到 AWS 控制台并手动删除它们,然后尝试再次运行 terraform destroy,然后它抱怨我手动删除的一个存储桶:Failed getting S3 bucket: NotFound: Not Found,另一个似乎很好。
请问有人知道怎么解决吗?谢谢。
【问题讨论】:
标签: amazon-web-services amazon-s3 terraform terraform-provider-aws