Skip to content

Commit

Permalink
actions: test another erc role name
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroJorge148 committed Sep 20, 2024
1 parent eaaeef4 commit 8457fe1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::327649228912:role/ecr-role-nest-clean
role-to-assume: arn:aws:iam::327649228912:role/ecr-role
aws-region: us-east-1

# - name: Login to AWS ECR
Expand Down
13 changes: 9 additions & 4 deletions infra/iam.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "aws_iam_openid_connect_provider" "oidc-git-nest-clean" {
resource "aws_iam_openid_connect_provider" "oidc-git" {
url = "https://token.actions.githubusercontent.com"

client_id_list = [
Expand All @@ -14,8 +14,8 @@ resource "aws_iam_openid_connect_provider" "oidc-git-nest-clean" {
}
}

resource "aws_iam_role" "ecr-role-nest-clean" {
name = "ecr-role-nest-clean"
resource "aws_iam_role" "ecr-role" {
name = "ecr-role"

assume_role_policy = jsonencode({
Version : "2012-10-17",
Expand Down Expand Up @@ -44,5 +44,10 @@ resource "aws_iam_role" "ecr-role-nest-clean" {
Iac = "True"
}

depends_on = [aws_iam_openid_connect_provider.oidc-git-nest-clean]
depends_on = [aws_iam_openid_connect_provider.oidc-git]
}

output "ecr-role-arn" {
value = aws_iam_role.ecr-role.arn
sensitive = false
}

0 comments on commit 8457fe1

Please sign in to comment.