Skip to content

Commit 5ea5eeb

Browse files
committed
AWS cross account config
1 parent 9c627c7 commit 5ea5eeb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.gitlab-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,10 @@ tests:
2323
- mv tofu /usr/local/bin/tofu
2424
- chmod +x /usr/local/bin/tofu
2525
- tofu version
26+
- echo "Assuming ddbuild-agent-ci role"
27+
- roleoutput=$(aws sts assume-role --role-arn arn:aws:iam::669783387624:role/ddbuild-terraform-aws-ecs-datadog --external-id ddbuild-terraform-aws-ecs-datadog-ci --role-session-name RoleSession)
28+
- export AWS_ACCESS_KEY_ID="$(echo "$roleoutput" | jq -r '.Credentials.AccessKeyId')"
29+
- export AWS_SECRET_ACCESS_KEY="$(echo "$roleoutput" | jq -r '.Credentials.SecretAccessKey')"
30+
- export AWS_SESSION_TOKEN="$(echo "$roleoutput" | jq -r '.Credentials.SessionToken')"
2631
script:
2732
- make test

0 commit comments

Comments
 (0)