Skip to content

Instantly share code, notes, and snippets.

@echo-devnull
Created June 9, 2016 07:02
Show Gist options
  • Save echo-devnull/23534aa8c8b7f8a893a2f79e08287695 to your computer and use it in GitHub Desktop.
Save echo-devnull/23534aa8c8b7f8a893a2f79e08287695 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Usage: ./init.sh
# terraform apply -var-file=./dev.tfvars
# TODO: figure out how to use the shared variables in dev_variables.tf across modules
tf_env="base"
terraform remote config -backend=s3 \
-backend-config="bucket=bucketname" \
-backend-config="key=$tf_env.tfstate" \
-backend-config="region=eu-west-1"
echo "set remote s3 state to $tf_env.tfstate"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment