From cfbb6800bc635a4c595f9f8a5a1fcde01ac52456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Wed, 13 Mar 2024 21:27:50 +0100 Subject: [PATCH] Set AWS credentials --- .github/workflows/check_terraform.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check_terraform.yml b/.github/workflows/check_terraform.yml index d0fd76de..8b2a4d2b 100644 --- a/.github/workflows/check_terraform.yml +++ b/.github/workflows/check_terraform.yml @@ -29,19 +29,19 @@ jobs: - uses: actions/checkout@v4 - name: Configure AWS credentials - env: - AWS_ACCESS_KEY_ID: ${{ secrets.OONIDEVOPS_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.OONIDEVOPS_AWS_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: eu-central-1 run: | - aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID - aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY - aws configure set default.region $AWS_DEFAULT_REGION - - # Create profile oonidevops_user - aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile oonidevops_user - aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile oonidevops_user - aws configure set default.region $AWS_DEFAULT_REGION --profile oonidevops_user + mkdir ~/.aws/ + cat < ~/.aws/credentials + [default] + aws_access_key_id = ${{ secrets.OONIDEVOPS_AWS_ACCESS_KEY_ID }} + aws_secret_access_key = ${{ secrets.OONIDEVOPS_AWS_SECRET_ACCESS_KEY }} + + [oonidevops_user] + aws_access_key_id = ${{ secrets.OONIDEVOPS_AWS_ACCESS_KEY_ID }} + aws_secret_access_key = ${{ secrets.OONIDEVOPS_AWS_SECRET_ACCESS_KEY }} + EOF + chmod 700 ~/.aws/ + chmod 600 ~/.aws/credentials - name: Install Terraform run: |