Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 70c840a

Browse files
committed
Update IAM roles
1 parent 99b94a2 commit 70c840a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ jobs:
2525
- environment: development
2626
ECR_REPO: development-sync-cube-ecr
2727
ECS_CLUSTER: development-sync-cluster
28+
GITHUB_IAM_ROLE: arn:aws:iam::471881062455:role/system/development_github_actions_role
2829
- environment: staging
2930
ECR_REPO: staging-sync-cube-ecr
3031
ECS_CLUSTER: staging-sync-cluster
32+
GITHUB_IAM_ROLE: arn:aws:iam::471881062455:role/system/staging_github_actions_role
3133
environment: ${{ matrix.environment }}
3234

3335
steps:
@@ -37,7 +39,7 @@ jobs:
3739
- name: Configure AWS credentials
3840
uses: aws-actions/configure-aws-credentials@v4
3941
with:
40-
role-to-assume: arn:aws:iam::471881062455:role/system/github_actions_role
42+
role-to-assume: ${{ matrix.GITHUB_IAM_ROLE }}
4143
role-session-name: GitHub_to_AWS_sync_svc_cube
4244
aws-region: us-east-1
4345

terraform/modules/sync/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ resource "aws_iam_openid_connect_provider" "github_openid" {
4747

4848
module "iam_github_oidc_role" {
4949
source = "terraform-aws-modules/iam/aws//modules/iam-github-oidc-role"
50-
name = "github_actions_role"
50+
name = "${var.env}_github_actions_role"
5151
path = "/system/"
5252
description = "GitHub IAM role for GitHub actions"
5353

0 commit comments

Comments
 (0)