Terraform-related code to create ASG in AWS supporting enmilocalfunciona.io blog entry.
This is the terraform code that backs up the blog entry.
- Terraform 0.9.4+, install here
- AWS access configured via IAM role or aws_access_key_id, aws_secret_access_key credentials
Inititialise terraform dependencies
$ terraform init
Check status
$ terraform plan
Build infrastructure
$ terraform apply
Build infrastructure scaling up to 6 instances
$ terraform apply -var asg_desired=6
Destroy infrastructure
$ terraform destroy