Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Commit

Permalink
export AWS_SHARED_CREDENTIALS_FILE to fix #8 (#14)
Browse files Browse the repository at this point in the history
* export AWS_SHARED_CREDENTIALS_FILE to fix #8

fix for #8

also fixed an obvious typo in the access_key unset

* move to more logical location in function
  • Loading branch information
keen99 authored and osterman committed Feb 22, 2019
1 parent db978c0 commit 6fe4965
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ function assume_role() {
# This is because the [`assume-role`](https://github.com/remind101/assume-role) cli does not respect the SDK environment variables.
export HOME="/artifacts"
export AWS_CONFIG_FILE="${HOME}/.aws/config"
export AWS_SHARED_CREDENTIALS_FILE="${HOME}/.aws/credentials"

# Unset AWS credential environment variables so they don't interfere with `assume-role`
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCES_KEY
unset AWS_SECRET_ACCESS_KEY

# Fetch the Role ARN from the configuration
export TF_VAR_aws_assume_role_arn=$(crudini --get ${AWS_CONFIG_FILE} "profile ${AWS_DEFAULT_PROFILE}" role_arn)
Expand Down

0 comments on commit 6fe4965

Please sign in to comment.