Skip to content

Commit 857b830

Browse files
committed
[PRMP-1427] add life cycle role to reports
1 parent 723ab0c commit 857b830

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

infrastructure/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@
300300
| [aws_s3_bucket_lifecycle_configuration.doc-store-lifecycle-rules](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration) | resource |
301301
| [aws_s3_bucket_lifecycle_configuration.lg-lifecycle-rules](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration) | resource |
302302
| [aws_s3_bucket_lifecycle_configuration.staging-store-lifecycle-rules](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration) | resource |
303+
| [aws_s3_bucket_lifecycle_configuration.statistical-reports-store-lifecycle-rules](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_lifecycle_configuration) | resource |
303304
| [aws_s3_bucket_policy.logs_bucket_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_policy) | resource |
304305
| [aws_s3_bucket_public_access_block.logs_bucket](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block) | resource |
305306
| [aws_s3_bucket_versioning.logs_bucket](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_versioning) | resource |

infrastructure/buckets.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,21 @@ module "statistical-reports-store" {
8080
]
8181
}
8282

83+
resource "aws_s3_bucket_lifecycle_configuration" "statistical-reports-store-lifecycle-rules" {
84+
bucket = module.statistical-reports-store.bucket_id
85+
rule {
86+
id = "Delete objects in ods-reports folder that have existed for 24 hours"
87+
status = "Enabled"
88+
89+
expiration {
90+
days = 1
91+
}
92+
93+
filter {
94+
prefix = "ods-reports/"
95+
}
96+
}
97+
}
8398

8499
# Lifecycle Rules
85100
resource "aws_s3_bucket_lifecycle_configuration" "lg-lifecycle-rules" {

0 commit comments

Comments
 (0)