Allow independent systems manage different parts of an s3 bucket configuration.
System A - manages lifecycle of bucket
System B - manages lifecycle of bucket lifecycle configuration
Both systems use terraform modules to isolate change scope.
resource "aws_s3_bucket" "b" {
bucket = "my-tf-test-bucket"
acl = "private"
tags {
Name = "My Bucket"
Environment = "Dev"
}
}
resource "aws_s3_bucket_lifecycle_configuration" {
bucket = "${aws_s3_bucket.b.id}"
rule {
id = "log"
enabled = true
prefix = "log/"
tags {
"rule" = "log"
"autoclean" = "true"
}
transition {
days = 15
storage_class = "ONEZONE_IA"
}
transition {
days = 30
storage_class = "STANDARD_IA"
}
transition {
days = 60
storage_class = "GLACIER"
}
expiration {
days = 90
}
}
rule {
id = "tmp"
prefix = "tmp/"
enabled = true
expiration {
date = "2016-01-12"
}
}
}
Would this make more sense as an addition to the aws_s3_bucket_object resource? That is an already existing location that would make sense to attach lifecycle rules to and is already composable within the existing terraform s3 resources
Has there been any movement on this? The lack of this feature is actually causing me to consider using a different tool for s3 provisioning.
I would like to see this as well. It's making my life very complicated right now.
Yes I need this as well
Another vote for this feature.
Another vote
+1
+1
+1, this is helpful, if we have a module for S3 and if we need to extend.
As of now as this does not exist, have to use custom resources for same and add lifecycle policy
Most helpful comment
Would this make more sense as an addition to the aws_s3_bucket_object resource? That is an already existing location that would make sense to attach lifecycle rules to and is already composable within the existing terraform s3 resources