Note: This module is in alpha state and is likely to contain bugs and updates may introduce breaking changes. It is not recommended for production use at this time.
This module is designed to deploy into Terraform Cloud Authors: David Wright ([email protected]) and Tony Vattahil ([email protected])
To deploy this module, do the following: Install Terraform. (See Install Terraform for a tutorial.)
Sign up and log into Terraform Cloud. (There is a free tier available.)
Generate terraform cloud token
terraform login
Export the TERRAFORM_CONFIG variable
export TERRAFORM_CONFIG="$HOME/.terraform.d/credentials.tfrc.json"
Example filepath = $HOME/.aws/terraform.tfvars
Example tfvars file contents
AWS_SECRET_ACCESS_KEY = "*****************"
AWS_ACCESS_KEY_ID = "*****************"
AWS_SESSION_TOKEN = "*****************"
(replace *** with AKEY and SKEY)
Note: STS-based credentials are optional but highly recommended.
!!!!CAUTION!!!!: Make sure your credential are secured ourside version control (and follow secrets mangement bestpractices)
Clone the aws-ia/terraform-aws-vpc repository.
git clone https://github.com/aws-ia/terraform-aws-vpc
Change directory to the root directory.
cd terraform-aws-vpc/
Change to deploy directory
cd setup_workspace
.
Run to following commands in order:
terraform init
terraform apply
or terraform apply -var-file="$HOME/.aws/terraform.tfvars"
.
Change directory to deploy dir (previous command auto generates backend.hcl)
cd ../deploy
terraform apply
or terraform apply -var-file="$HOME/.aws/terraform.tfvars"
.
Terraform apply is run remotely in Terraform Cloud