Skip to content

Commit

Permalink
Add awscli setting for test-e2e-terratests
Browse files Browse the repository at this point in the history
  • Loading branch information
lgallard committed Aug 25, 2021
1 parent 0395e2a commit 6f6ac33
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .circleci/config.yml
Expand Up @@ -49,6 +49,7 @@ jobs:
- run:
name: test-terraform-format-and-docs
command: make pre-commit

- run:
name: Install awscli
command: sudo -H pip3 install awscli
Expand Down Expand Up @@ -169,6 +170,31 @@ jobs:
make init-makefiles
git update-index --assume-unchanged "Makefile"
- run:
name: Install awscli
command: sudo -H pip3 install awscli

- run:
name: Configure awscli
command: |
# AWS credentials dir
mkdir --parents /home/circleci/.aws/bb
sudo chown -R $USER:$USER /home/circleci/.aws
# AWS defautl awscli profile
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 region us-east-1
aws configure set output json
# AWS dev awscli profile
aws configure set role_arn arn:aws:iam::$AWS_ACCOUNT_ID_DEV:role/DeployMaster --profile $AWS_PROFILE_NAME
aws configure set source_profile default --profile $AWS_PROFILE_NAME
# moving credentials to specific project folder
cp /home/circleci/.aws/credentials /home/circleci/.aws/bb/credentials
cp /home/circleci/.aws/config /home/circleci/.aws/bb/config
- run:
name: Test AWS permissions
command: aws ec2 describe-instances --region us-east-1 --profile $AWS_PROFILE_NAME
Expand Down

0 comments on commit 6f6ac33

Please sign in to comment.