From e40970df5ca208f27b6e51d9a88e7797a889ac0d Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 5 Jul 2023 19:16:11 +0100 Subject: [PATCH] Try creating DevAdmin and ProdAdmin profiles in actions --- .github/workflows/deploy_terraform.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index dcfb075f..8dacab29 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -14,6 +14,23 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Setup AWS credentials file + run: | + mkdir -p ~/.aws + echo "[DevAdmin]" > ~/.aws/credentials + echo "aws_access_key_id = ${{ secrets.DEV_AWS_ACCESS_KEY_ID }}" >> ~/.aws/credentials + echo "aws_secret_access_key = ${{ secrets.DEV_AWS_SECRET_ACCESS_KEY }}" >> ~/.aws/credentials + echo "[ProdAdmin]" >> ~/.aws/credentials + echo "aws_access_key_id = ${{ secrets.PROD_AWS_ACCESS_KEY_ID }}" >> ~/.aws/credentials + echo "aws_secret_access_key = ${{ secrets.PROD_AWS_SECRET_ACCESS_KEY }}" >> ~/.aws/credentials + + - name: Setup AWS config file + run: | + echo "[profile DevAdmin]" > ~/.aws/config + echo "region = eu-west-2" >> ~/.aws/config + echo "[profile ProdAdmin]" >> ~/.aws/config + echo "region = eu-west-2" >> ~/.aws/config + - name: Setup Terraform uses: hashicorp/setup-terraform@v1 with: