Skip to content

Commit

Permalink
Run 'terraform fmt'
Browse files Browse the repository at this point in the history
  • Loading branch information
TomJKing committed Jan 20, 2025
1 parent 61f45fd commit 6040028
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions root_s3_life_cycle.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
locals {
delete_object_tag_key = "Delete"
delete_object_tag_value = "True"
default_expiration_days = local.environment == "prod" ? 30 : 7

clean_buckets = [module.upload_bucket]
clean_bucket_expiration_days = local.environment == "prod" ? 30 : 7
clean_bucket_expiration_days = local.default_expiration_days
clean_bucket_policy_status = "Disabled"

backend_checks_buckets = [module.backend_lambda_function_bucket]
Expand All @@ -15,11 +16,11 @@ locals {
dirty_bucket_policy_status = local.environment == "intg" ? "Enabled" : "Disabled"

export_buckets = [module.export_bucket, module.flat_format_export_bucket]
export_bucket_expiration_days = local.environment == "prod" ? 30 : 7
export_bucket_expiration_days = local.default_expiration_days
export_bucket_policy_status = "Disabled"

quarantine_buckets = [module.upload_bucket_quarantine]
quarantine_bucket_expiration_days = local.environment == "prod" ? 30 : 7
quarantine_bucket_expiration_days = local.default_expiration_days
quarantine_buckets_policy_status = "Disabled"
}

Expand Down Expand Up @@ -60,7 +61,7 @@ resource "aws_s3_bucket_lifecycle_configuration" "quarantine_s3_buckets" {
}

resource "aws_s3_bucket_lifecycle_configuration" "backend_checks_s3_buckets" {
for_each = { for bucket in local.backend_checks_buckets: bucket.s3_bucket_name => bucket }
for_each = { for bucket in local.backend_checks_buckets : bucket.s3_bucket_name => bucket }
bucket = each.value.s3_bucket_id
rule {
id = "delete-backend-checks-buckets-objects"
Expand Down

0 comments on commit 6040028

Please sign in to comment.