Skip to content

Commit 60d729d

Browse files
authored
NOJIRA Update auto ops trust policy for automation test repo (#831)
1 parent 9717e5f commit 60d729d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

infra/iam.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,13 @@ resource "aws_iam_role" "auto_ops" {
6969
Action = "sts:AssumeRoleWithWebIdentity",
7070
Condition = {
7171
StringEquals = {
72-
"token.actions.githubusercontent.com:aud" : "sts.amazonaws.com"
72+
"token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
7373
},
7474
StringLike = {
75-
"token.actions.githubusercontent.com:sub" : "repo:NHSDigital/immunisation-fhir-api:*"
75+
"token.actions.githubusercontent.com:sub": var.environment != "prod" ? [
76+
"repo:NHSDigital/immunisation-fhir-api:*",
77+
"repo:NHSDigital/imms_fhir_api_automation:*"
78+
] : ["repo:NHSDigital/immunisation-fhir-api:*"]
7679
}
7780
}
7881
}

0 commit comments

Comments
 (0)