Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Terraform Workshop

Terraform Workshop

Intro to Terraform workshop I gave for the Hacker Garage Community day 2017

Avatar for Orlando Del Aguila

Orlando Del Aguila

March 11, 2017
Tweet

More Decks by Orlando Del Aguila

Other Decks in Programming

Transcript

  1. Terraform / Data sources data "aws_ami" "ubuntu" { most_recent =

    true filter { name = "name" values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-*"] } } resource "aws_instance" "example" { ami = "${data.aws_ami.ubuntu.id}" instance_type = "t2.micro" }
  2. Terraform / Variables variable “app_name" { default = “my-super-app-tf“ }

    
 variable "heroku" { default = { email = “[email protected]" api_key = “123123" } } variable "list" { default = [“first”,”second”] }
  3. Terraform / Variables data "aws_ami" "ubuntu" { most_recent = true

    filter { name = "name" values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-*"] } } resource "aws_instance" "example" { ami = "${data.aws_ami.ubuntu.id}" instance_type = "t2.micro" }
  4. Terraform / Modules variable "app_name" {} module "app"{ source =

    "./heroku_app" app_name = "${var.app_name}" region = "us" }