terraform-aws-modules / terraform-aws-s3-bucket

Terraform module to create AWS S3 resources 🇺🇦

Home Page:https://registry.terraform.io/modules/terraform-aws-modules/s3-bucket/aws

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to use lifecycle meta argument prevent_destroy

shettypriy opened this issue · comments

I am trying to refractor the terraform resource to module and currently unable to use the following lifecyle meta-arguments

lifecycle {
prevent_destroy = "true"
}

It gives me the following error

Error: Reserved block type name in module block
The block type name "lifecycle" is reserved for use by Terraform in a future version.

Ref issue #186

Terraform doesn't allow the use of variables inside of lifecycle blocks and we can't pass lifecycle into the module.

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.