From 9ebf7bf5dcb95088b04fea7dcfc2063de3a900cf Mon Sep 17 00:00:00 2001 From: Pedro Jorge Date: Thu, 19 Sep 2024 16:35:10 -0300 Subject: [PATCH] actions: ecr connection --- .github/workflows/ci.yml | 4 ++-- infra/iam.tf | 2 ++ infra/main.tf | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dce9a5a..223509c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,8 +44,8 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: 'arn:aws:iam::327649228912:role/ecr-role' - aws-region: us-east-2 + role-to-assume: arn:aws:iam::327649228912:role/ecr-role + aws-region: us-east-1 - name: Login to AWS ECR id: login-erc diff --git a/infra/iam.tf b/infra/iam.tf index fc0786b..607fe58 100644 --- a/infra/iam.tf +++ b/infra/iam.tf @@ -70,4 +70,6 @@ resource "aws_iam_role" "ecr-role" { tags = { Iac = "True" } + + depends_on = [ aws_iam_openid_connect_provider.oidc-git ] } diff --git a/infra/main.tf b/infra/main.tf index d3245ae..a1a8835 100644 --- a/infra/main.tf +++ b/infra/main.tf @@ -8,5 +8,6 @@ terraform { } provider "aws" { + region = "us-east-1" profile = "pj-aws-sso" } \ No newline at end of file