Control replace/delete behavior and ignored drift.
Section: Meta-arguments
Lifecycle rules
hcl
hcl
resource "aws_s3_bucket" "logs" {
bucket = var.bucket_name
lifecycle {
prevent_destroy = true
ignore_changes = [tags]
}
}Explanation
Control replace/delete behavior and ignored drift.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Meta-arguments