We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2b5f44f + f7234fd commit 0c3064bCopy full SHA for 0c3064b
1 file changed
azure/components/aws-assume-role.yml
@@ -22,10 +22,9 @@ steps:
22
aws_role="$(ROLE)"
23
echo "assume role: '${aws_role}'"
24
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)"
+ if [[ "${{ parameters.aws_account }}" =~ ^(prod|dev)$ ]]; then
+ echo "account is ${{ parameters.aws_account }}"
+ account_id="$(aws ssm get-parameter --name /account-ids/${{ parameters.aws_account }} --query Parameter.Value --output text)"
29
aws_role="arn:aws:iam::${account_id}:role/${aws_role}"
30
fi
31
0 commit comments