Skip to content

Commit 980b843

Browse files
authored
[NDR-194] Resolve TF warnings relating to S3 lifecycle rules (#358)
* [NDR-194] adding empty filter block * [NDR-194] adding days to lifecycle cofnig --------- Co-authored-by: Sam Whyte <[email protected]>
1 parent 3acb7df commit 980b843

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

infrastructure/buckets.tf

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ resource "aws_s3_bucket_lifecycle_configuration" "lg-lifecycle-rules" {
139139
status = "Enabled"
140140
transition {
141141
storage_class = "INTELLIGENT_TIERING"
142+
days = 0
142143
}
144+
filter {}
143145
}
144146
}
145147

@@ -150,7 +152,9 @@ resource "aws_s3_bucket_lifecycle_configuration" "doc-store-lifecycle-rules" {
150152
status = "Enabled"
151153
transition {
152154
storage_class = "INTELLIGENT_TIERING"
155+
days = 0
153156
}
157+
filter {}
154158
}
155159
}
156160

@@ -173,7 +177,9 @@ resource "aws_s3_bucket_lifecycle_configuration" "staging-store-lifecycle-rules"
173177
status = "Enabled"
174178
transition {
175179
storage_class = "INTELLIGENT_TIERING"
180+
days = 0
176181
}
182+
filter {}
177183
}
178184
}
179185

@@ -186,6 +192,20 @@ resource "aws_s3_bucket_lifecycle_configuration" "ndr-zip-request-store-lifecycl
186192
expiration {
187193
days = 1
188194
}
195+
filter {}
196+
}
197+
}
198+
199+
resource "aws_s3_bucket_lifecycle_configuration" "pdm_document_store" {
200+
bucket = module.pdm-document-store.bucket_id
201+
rule {
202+
id = "default-to-intelligent-tiering"
203+
status = "Enabled"
204+
transition {
205+
storage_class = "INTELLIGENT_TIERING"
206+
days = 0
207+
}
208+
filter {}
189209
}
190210
}
191211

@@ -353,14 +373,3 @@ module "pdm-document-store" {
353373
owner = var.owner
354374
force_destroy = local.is_force_destroy
355375
}
356-
357-
resource "aws_s3_bucket_lifecycle_configuration" "pdm_document_store" {
358-
bucket = module.pdm-document-store.bucket_id
359-
rule {
360-
id = "default-to-intelligent-tiering"
361-
status = "Enabled"
362-
transition {
363-
storage_class = "INTELLIGENT_TIERING"
364-
}
365-
}
366-
}

infrastructure/modules/ecr/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ module "ecr_repository" {
4949
|------|-------------|------|---------|:--------:|
5050
| <a name="input_allow_force_destroy"></a> [allow\_force\_destroy](#input\_allow\_force\_destroy) | Enable force destroy of the ECR module | `bool` | `false` | no |
5151
| <a name="input_app_name"></a> [app\_name](#input\_app\_name) | Name of the application (used in repository naming). | `string` | n/a | yes |
52-
| <a name="input_current_account_id"></a> [current\_account\_id](#input\_current\_account\_id) | n/a | `string` | n/a | yes |
5352
| <a name="input_environment"></a> [environment](#input\_environment) | Deployment environment tag used for naming and labeling (e.g., dev, prod). | `string` | n/a | yes |
5453
| <a name="input_owner"></a> [owner](#input\_owner) | Identifies the team or person responsible for the resource (used for tagging). | `string` | n/a | yes |
5554
## Outputs

0 commit comments

Comments
 (0)