Skip to content

Instantly share code, notes, and snippets.

@NomadBlacky
Created April 24, 2019 02:33
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 NomadBlacky/caafbec78980ea7532d0c04ab93b370d to your computer and use it in GitHub Desktop.
Save NomadBlacky/caafbec78980ea7532d0c04ab93b370d to your computer and use it in GitHub Desktop.
Terraform on Docker with aws-vault
$ aws-vault exec admin-profile -- docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION -e AWS_SESSION_TOKEN -e AWS_SECURITY_TOKEN -it -v $PWD:/app/ -w /app/ hashicorp/terraform:0.11.8 init
Initializing the backend...
Backend configuration changed!
Terraform has detected that the configuration specified for the backend
has changed. Terraform will now check for existing state in the backends.
Error inspecting states in the "s3" backend:
AccessDenied: Access Denied
status code: 403, request id: XXXXXXXXXXXXXX, host id: XXXXXXXXXXXXXXX
Prior to changing backends, Terraform inspects the source and destination
states to determine what kind of migration steps need to be taken, if any.
Terraform failed to load the states. The data in both the source and the
destination remain unmodified. Please resolve the above error and try again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment