Skip to content

Commit d422c78

Browse files
lukey-lukemianava
andauthored
Apply suggestions from code review
Co-authored-by: mianava <miaferguson@navapbc.com>
1 parent 150835e commit d422c78

File tree

1 file changed

+12
-1
lines changed
  • terraform/services/ecr-cleanup

1 file changed

+12
-1
lines changed

terraform/services/ecr-cleanup/main.tf

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,21 @@ locals {
88
}
99
}
1010
}
11+
module "standards" {
12+
source = "github.com/CMSgov/cdap//terraform/modules/standards?ref=####"
13+
providers = { aws = aws, aws.secondary = aws.secondary }
14+
app = "cdap"
15+
env = var.env
16+
root_module = "https://github.com/CMSgov/cdap/tree/main/terraform/services/ecr-cleanup"
17+
service = ecr-cleanup
18+
}
1119

1220
data "aws_caller_identity" "current" {}
1321
data "aws_region" "current" {}
14-
22+
data "aws_ecr_repository" "service" {
23+
for_each = toset(var.repositories[module.standards.env])
24+
name = each.key
25+
}
1526
data "aws_iam_policy_document" "ecr_cleanup" {
1627
statement {
1728
sid = "ECRAccess"

0 commit comments

Comments
 (0)