Skip to content

pipe980819/aws-terraform-workshop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Terraform Workshop

Examples about Infrastructure as Code, using Terraform and AWS

Sample application: Hello From

Infrastructure diagram

Getting Started

Set up your local environment

pip install awscli
  • Configure AWS CLI with your AWS credentials
aws configure
  • Clone this repository
  • (Optional) install and use Landscape

State 1

Features

  • An EC2 instance
  • A security group
  • User data
  • Local tfstate

Concepts ✏️

  • HCL
  • Provider
  • Resource
  • State
  • Init
  • Plan
  • Apply
  • Destroy

State 2

Features

  • Remote backend 😁
  • Variables
  • Outputs

Concepts ✏️

  • Variables
  • Outputs
  • Count
terraform plan -var 'vpc_id=vpc-953f78ee' -var 'app_port=5000' -var 'instance_type=t2.micro' -var 'subnet_id=subnet-b1455dec' -var 'key_name=aws-terraform-workshop'
terraform plan -var 'vpc_id=vpc-953f78ee' -var 'app_port=5000' -var 'instance_type=t2.micro' -var 'subnet_id=subnet-b1455dec' -var 'key_name=aws-terraform-workshop' -var 'instances=2'

State 3

Features

  • A launch configuration
  • An autoscaling group
  • An ELB

This is the definitive infrastructure

Concepts ✏️

  • Variables file
  • Lists
terraform plan -var-file=myvars.tfvars

State 4

Features

  • "Environments"

Concepts ✏️

  • Modules
  • ifs (interpolation)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 95.3%
  • Shell 4.7%