Skip to content

Commit

Permalink
fix status
Browse files Browse the repository at this point in the history
  • Loading branch information
javsanbel2 committed Nov 28, 2024
1 parent a950ff7 commit 7ec0ae7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ resource "aws_s3_bucket_lifecycle_configuration" "apiary_data_bucket_versioning_
bucket = each.value["data_bucket"]
rule {
id = "expire-noncurrent-versions-days"
status = lookup(each.value, "noncurrent_version_expiration_days", "Disabled")
status = lookup(each.value, "noncurrent_version_expiration_days", "") != "" ? "Enabled" : "Disabled"

noncurrent_version_expiration {
noncurrent_days = lookup(each.value, "s3_noncurrent_version_expiration_days", var.noncurrent_version_expiration_days)
}
}
rule {
id = "expire-noncurrent-versions-number"
status = lookup(each.value, "newer_noncurrent_versions", "Disabled")
status = lookup(each.value, "newer_noncurrent_versions", "") != "" ? "Enabled" : "Disabled"

noncurrent_version_expiration {
newer_noncurrent_versions = lookup(each.value, "newer_noncurrent_versions", var.newer_noncurrent_versions)
Expand Down

0 comments on commit 7ec0ae7

Please sign in to comment.