Skip to content

Instantly share code, notes, and snippets.

@lunarxlark
Last active October 1, 2018 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lunarxlark/259ff40fb918ec643fabca84f19f1a43 to your computer and use it in GitHub Desktop.
Save lunarxlark/259ff40fb918ec643fabca84f19f1a43 to your computer and use it in GitHub Desktop.
awsenv(+Terraform) variables setting
# awsenv
function setaws() {
[[ $# -gt 0 ]] && eval "$(~/.local/bin/awsenv $@)";
export TF_VAR_aws_access_key=${AWS_ACCESS_KEY_ID}
export TF_VAR_aws_secret_key=${AWS_SECRET_ACCESS_KEY}
export TF_VAR_aws_region=${AWS_DEFAULT_REGION}
exec $SHELL -l
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment