-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathterraform.tf
More file actions
43 lines (36 loc) · 1.14 KB
/
terraform.tf
File metadata and controls
43 lines (36 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
######################################################################
### EXAMPLE USAGE: AWS_ECR
module "Org_Module" {
/* Org module inputs */
}
module "AWS_ECR" {
source = "git@github.com:Nerdware-LLC/fixit-cloud-modules.git//AWS_ECR"
repositories = {
"${local.ORG_SHARED_REPO_NAME}" = {
tags = { Name = local.ORG_SHARED_REPO_NAME }
policy_config = {
allow_push_and_pull_images = {
principals = {
type = "AWS"
identifiers = [
for account in module.Org_Module.Organization.accounts : "arn:aws:iam:${account.id}:root"
if contains(["My_Dev_Account", "My_Prod_Account"], account.name)
]
}
conditions = {
"ForAnyValue:StringLike" = {
key = "aws:PrincipalOrgPaths"
values = [
"${module.Org_Module.Organization.id}/*/${module.Org_Module.Organizational_Units["Workloads_OU"].id}"
]
}
}
}
}
}
}
registry_scanning_config = {
scan_type = "BASIC"
}
}
######################################################################