Skip to content

Commit 3c1ffbc

Browse files
authored
Merge pull request #621 from NHSDigital/APIM-AWS-Assume-Role-Hotfix
Add conditional check for AWS assume role template
2 parents 75ee0e0 + 090a058 commit 3c1ffbc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

azure/components/aws-assume-role.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ steps:
3737
if [[ "$AWS_ACCOUNT" =~ ^(prod|dev)$ ]]; then
3838
echo "account is $AWS_ACCOUNT"
3939
account_id="$(aws ssm get-parameter --name /account-ids/$AWS_ACCOUNT --query Parameter.Value --output text)"
40-
aws_role="arn:aws:iam::${account_id}:role/${aws_role}"
40+
if [[ "${aws_role}" != arn:aws:iam:* ]]; then
41+
aws_role="arn:aws:iam::${account_id}:role/${aws_role}"
42+
fi
4143
fi
4244
4345
if [[ "${aws_role}" != arn:aws:iam:* ]]; then

0 commit comments

Comments
 (0)