diff --git a/.github/workflows/deploy-opentofu.yml b/.github/workflows/deploy-opentofu.yml index 6a95f2fd..1b0c1d7f 100644 --- a/.github/workflows/deploy-opentofu.yml +++ b/.github/workflows/deploy-opentofu.yml @@ -16,7 +16,12 @@ on: type: choice options: - staging - - production + - production + aws_region: + description: 'AWS region' + type: string + required: false + default: 'us-east-1' pull_request: branches: - main @@ -61,8 +66,8 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 with: - aws-region: ${{ secrets.AWS_REGION }} - role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-role-shared + aws-region: ${{ inputs.aws_region }} + role-to-assume: arn:aws:iam::${{ env.TF_VAR_AWS_ACCOUNT_ID }}:role/github-actions-role-shared - name: Setup OpenTofu uses: opentofu/setup-opentofu@v1 @@ -97,8 +102,8 @@ jobs: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 with: - aws-region: ${{ secrets.AWS_REGION }} - role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-role-shared + aws-region: ${{ inputs.aws_region }} + role-to-assume: arn:aws:iam::${{ env.TF_VAR_AWS_ACCOUNT_ID }}:role/github-actions-role-shared - name: Setup OpenTofu uses: opentofu/setup-opentofu@v1