Docker Image for Terraform. Please see official document for more information about Terraform.
latest
- Terraform 0.8.7
# Get the Docker image
$ docker pull quay.io/wantedly/terraform:latest
# Prepare .tf files
$ ls terraform
aws.tf s3.tf rds.tf
# Run `terraform plan`
$ docker run \
--rm \
-it \
-e AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXX \
-e AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxx \
-e AWS_DEFAULT_REGION=ap-northeast-1 \
-v /path/to/terraform:/terraform \
quay.io/wantedly/terraform:latest \
terraform plan
# Run `terraform apply`
$ docker run \
--rm \
-it \
-e AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXX \
-e AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxx \
-e AWS_DEFAULT_REGION=ap-northeast-1 \
-v /path/to/terraform:/terraform \
quay.io/wantedly/terraform:latest \
terraform apply