terraform/examples/aws-asg
John Wards 61b9f3108f Fix auto scaling example to use ID rather than name
Lost a little while figuring out why this example wouldn't work, seems you need to use id, not name :)
2016-01-11 22:00:09 +00:00
..
README.md updated doccs to include correct destroy statement fix typo 2015-07-12 13:59:50 -04:00
main.tf Fix auto scaling example to use ID rather than name 2016-01-11 22:00:09 +00:00
outputs.tf examples: unify the configuration file syntax 2015-08-31 10:24:07 +02:00
userdata.sh
variables.tf examples: unify the configuration file syntax 2015-08-31 10:24:07 +02:00

README.md

ASG example

This example shows how to launch instances using Auto Scaling Groups.

This creates a security group, launch configuration, auto scaling group and an ELB. The user data for launch configuration installs nginx and it listens on port 80.

The example uses latest Ubuntu AMIs.

Make sure you change the list of availability zones that is applicable to your account and region.

To run, configure your AWS provider as described in https://www.terraform.io/docs/providers/aws/index.html

Running the example

For planning phase

terraform plan -var 'key_name={your_key_name}}'

For apply phase

terraform apply -var 'key_name={your_key_name}}'

Once the stack is created, wait for few minutes and test the stack by launching a browser with ELB url.

To remove the stack

terraform destroy -var 'key_name={your_key_name}}'