Skip to content

Commit

Permalink
removed s3 lifecycle (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddl-olsonJD authored Mar 20, 2024
1 parent 9c2e4cb commit 6178e07
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 49 deletions.
1 change: 0 additions & 1 deletion modules/infra/submodules/storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ No modules.
| [aws_s3_bucket.logs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_bucket.monitoring](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_bucket.registry](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | resource |
| [aws_s3_bucket_lifecycle_configuration.costs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration) | resource |
| [aws_s3_bucket_logging.buckets_logging](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_logging) | resource |
| [aws_s3_bucket_policy.buckets_policies](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource |
| [aws_s3_bucket_public_access_block.block_public_access](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | resource |
Expand Down
48 changes: 0 additions & 48 deletions modules/infra/submodules/storage/s3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -494,54 +494,6 @@ resource "aws_s3_bucket" "costs" {
object_lock_enabled = false
}

resource "aws_s3_bucket_lifecycle_configuration" "costs" {
count = var.storage.costs_enabled ? 1 : 0
bucket = aws_s3_bucket.costs[0].id

rule {
id = "AssetsExpiration"

expiration {
days = 15
}

filter {
prefix = "federated/${var.deploy_id}/etl/bingen/assets/"
}

status = "Enabled"
}


rule {
id = "AllocationsExpiration"

expiration {
days = 15
}

filter {
prefix = "federated/${var.deploy_id}/etl/bingen/allocations/"
}

status = "Enabled"
}

rule {
id = "incomplete_upload"

abort_incomplete_multipart_upload {
days_after_initiation = 7
}

status = "Enabled"
}

depends_on = [
aws_s3_bucket.costs
]
}

data "aws_iam_policy_document" "costs" {
count = var.storage.costs_enabled ? 1 : 0

Expand Down

0 comments on commit 6178e07

Please sign in to comment.