Skip to content

Commit f7234fd

Browse files
committed
APM-0000 Allow 'dev' to be account in aws-assume-role.yml
1 parent 2b5f44f commit f7234fd

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

azure/components/aws-assume-role.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ steps:
2222
aws_role="$(ROLE)"
2323
echo "assume role: '${aws_role}'"
2424
25-
aws_account="${{ parameters.aws_account }}"
26-
if [[ "${aws_account}" == "prod" ]]; then
27-
echo "account is prod"
28-
account_id="$(aws ssm get-parameter --name /account-ids/prod --query Parameter.Value --output text)"
25+
if [[ "${{ parameters.aws_account }}" =~ ^(prod|dev)$ ]]; then
26+
echo "account is ${{ parameters.aws_account }}"
27+
account_id="$(aws ssm get-parameter --name /account-ids/${{ parameters.aws_account }} --query Parameter.Value --output text)"
2928
aws_role="arn:aws:iam::${account_id}:role/${aws_role}"
3029
fi
3130

0 commit comments

Comments
 (0)