Skip to content

Commit 27c8dc2

Browse files
Use CDK bootstrap roles for deployment
1 parent 07769bb commit 27c8dc2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/deploy.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,20 @@ jobs:
2424
- name: Checkout repository
2525
uses: actions/checkout@v4
2626

27-
- name: Configure AWS Credentials
27+
- name: Configure AWS Credentials (OIDC)
2828
uses: aws-actions/configure-aws-credentials@v4
2929
with:
3030
aws-region: ${{ env.AWS_REGION }}
3131
role-to-assume: ${{ secrets.AWS_OIDC }}
32+
role-session-name: GitHubActions-OIDC
33+
34+
- name: Assume CDK Deploy Role for Terraform
35+
uses: aws-actions/configure-aws-credentials@v4
36+
with:
37+
aws-region: ${{ env.AWS_REGION }}
38+
role-to-assume: arn:aws:iam::553637109631:role/cdk-hnb659fds-deploy-role-553637109631-eu-central-1
39+
role-chaining: true
40+
role-session-name: GitHubActions-Deploy
3241

3342
- name: Setup Terraform
3443
uses: hashicorp/setup-terraform@v3

0 commit comments

Comments
 (0)