github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/examples/aws-asg/README.md (about)

     1  # ASG example
     2  
     3  This example shows how to launch instances using Auto Scaling Groups.
     4  
     5  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.
     6  
     7  The example uses latest Ubuntu AMIs.
     8  
     9  Make sure you change the list of availability zones that is applicable to your account and region.
    10  
    11  To run, configure your AWS provider as described in https://www.terraform.io/docs/providers/aws/index.html
    12  
    13  Running the example
    14  
    15  For planning phase 
    16  
    17  ```
    18  terraform plan -var 'key_name={your_key_name}'
    19  ```
    20  
    21  For apply phase
    22  
    23  ```
    24  terraform apply -var 'key_name={your_key_name}'
    25  ```
    26  Once the stack is created, wait for few minutes and test the stack by launching a browser with ELB url.
    27  
    28  To remove the stack
    29  
    30  ```
    31   terraform destroy -var 'key_name={your_key_name}'
    32  ```