infrastructure as code: introduction to terraform

29
infrastructure as code Alexander Popov GPAWSUG meetup 07.27.16 $ intro to terraform

Upload: alexander-popov

Post on 13-Jan-2017

116 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Infrastructure as Code: Introduction to Terraform

infrastructure as code

Alexander Popov

GPAWSUG meetup 07.27.16

$ intro to terraform

Page 2: Infrastructure as Code: Introduction to Terraform

We are hiring like crazy, of course…

Page 3: Infrastructure as Code: Introduction to Terraform

What is it?

Page 4: Infrastructure as Code: Introduction to Terraform

not this…

Page 5: Infrastructure as Code: Introduction to Terraform
Page 6: Infrastructure as Code: Introduction to Terraform

Oh, great… So, it’s like Chef, Puppet, Ansible, Vagrant, CloudFormation, Heat, etc.?

Page 7: Infrastructure as Code: Introduction to Terraform

Why not just use CloudFormation or Heat?

Page 8: Infrastructure as Code: Introduction to Terraform

also

Page 9: Infrastructure as Code: Introduction to Terraform

vs.

Page 10: Infrastructure as Code: Introduction to Terraform

install

Page 11: Infrastructure as Code: Introduction to Terraform

define

https://github.com/hashicorp/hcl

Page 12: Infrastructure as Code: Introduction to Terraform

define - JSON

Page 13: Infrastructure as Code: Introduction to Terraform

plan

Page 14: Infrastructure as Code: Introduction to Terraform

apply

Page 15: Infrastructure as Code: Introduction to Terraform

relish

Page 16: Infrastructure as Code: Introduction to Terraform

discard

Page 17: Infrastructure as Code: Introduction to Terraform

discard

Page 18: Infrastructure as Code: Introduction to Terraform

destroy

Page 19: Infrastructure as Code: Introduction to Terraform

magic

Page 20: Infrastructure as Code: Introduction to Terraform

ta da

Page 21: Infrastructure as Code: Introduction to Terraform

state?

Page 22: Infrastructure as Code: Introduction to Terraform

before and after

Page 23: Infrastructure as Code: Introduction to Terraform

modules

Page 24: Infrastructure as Code: Introduction to Terraform

terraform get

Page 25: Infrastructure as Code: Introduction to Terraform

• chef (runs chef client)

• connection (connects via ssh/winrm)

• file (copies files)

• local-exec (invokes local exe)

• eemote-exec (invokes remote exe)

• null_resource

provisioners

Page 26: Infrastructure as Code: Introduction to Terraform

local-exec

Page 27: Infrastructure as Code: Introduction to Terraform

• modules

• provisioners

• state management & remotes

• resource graphs

• parallelism

“advanced” topics

Page 28: Infrastructure as Code: Introduction to Terraform

References• https://www.terraform.io/intro/

• https://github.com/hashicorp/terraform

• https://github.com/hashicorp/hcl

• https://github.com/terraform-community-modules

Page 29: Infrastructure as Code: Introduction to Terraform

Questions?