From 8457fe1156897ce2061db52cb91ed9644d2ab21f Mon Sep 17 00:00:00 2001 From: Pedro Jorge Date: Fri, 20 Sep 2024 10:20:53 -0300 Subject: [PATCH] actions: test another erc role name --- .github/workflows/ci.yml | 2 +- infra/iam.tf | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2226cd..2d61dcb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/infra/iam.tf b/infra/iam.tf index 502b77f..de89804 100644 --- a/infra/iam.tf +++ b/infra/iam.tf @@ -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 = [ @@ -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", @@ -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 +} \ No newline at end of file