Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.43 KB

File metadata and controls

44 lines (31 loc) · 1.43 KB

ASG example

This folder contains a Terraform configuration that shows an example of how to use the asg-rolling-deploy module to deploy a cluster of web servers (using EC2 and Auto Scaling) in an Amazon Web Services (AWS) account.

For more info, please see Chapter 8, "Production-grade Terraform code", of Terraform: Up and Running.

Pre-requisites

Please note that this code was written for Terraform 1.x.

Quick start

Please note that this example will deploy real resources into your AWS account. We have made every effort to ensure all the resources qualify for the AWS Free Tier, but we are not responsible for any charges you may incur.

Configure your AWS access keys as environment variables:

export AWS_ACCESS_KEY_ID=(your access key id)
export AWS_SECRET_ACCESS_KEY=(your secret access key)

Deploy the code:

terraform init
terraform apply

Clean up when you're done:

terraform destroy