Terraform template for AWS Autoscaling stack
WARNING: You are fully aware that AWS resources created by this template
are not always free even during tests.
Clone the repo
$ git clone git@github.com:royge/terraform-aws-autoscaling.git
Set AWS credentials
$ export AWS_ACCESS_KEY_ID=<your-access-key-id>
$ export AWS_SECRET_ACCESS_KEY=<your-secret-access-key>
Run docker terraform docker container
$ make docker
Alternative:
If you don’t like docker, you can install terraform
directly on your machine using the following command.
$ wget https://releases.hashicorp.com/terraform/0.11.8/terraform_0.11.8_linux_amd64.zip
$ sudo unzip -o -d /usr/local/bin terraform_0.11.8_linux_amd64.zip
$ terraform version
Initialize and validate
$ ENV=test make init
$ ENV=test make validate
Execute plan
$ ENV=test make plan
Execute apply
$ ENV=test make apply
Execute destroy
$ ENV=test make destroy
Install Go 1.11 or above
Download tests dependencies
$ make test-prepare
Execute tests
Before running this command, make sure to have terraformtest.io
certificate
added in ap-southeast-1
region of you AWS account.
If you have existing certificate you can modify domain
and awsRegion
variable values in the autoscaling_test.go
file.
$ make test
userdata.sh
location configurable