@[email protected]

Terraform Hands-on Workshop

by Rob Richardson

  @[email protected]

https://robrich.org/

Demo

Terraform

With Click-Ops, it's easy to miss a step and have subtly different environments

causing very hard-to-find bugs

Add Automation

write shell scripts that call cloud APIs in sequence

Add Automation

script then Click-Ops the last mile

Add Automation

script then Click-Ops the last mile

Deployment Evolution

      flowchart TD
        A[Click-Ops] --> B[Script];
        B --> C[Script and Click-Ops];
        C --> D[Infrastructure as Code];
    

Cattle not Pets

You name pets,
you feed pets,
you dress them up
in little dresses

Cattle not Pets

There's a whole herd
of cattle, and we tend
to the entire herd at once

Cattle not Pets

Cattle not Pets

Goal: don't have magic servers

Infrastructure-as-Code Tools

Tool Pros & Cons
Puppet The original
Chef Ruby syntax templates
Ansible Automate remoting in parallel
Terraform Industry standard
Pulumi Use programming languages

Terraform

The industry-standard
Infrastructure-as-Code tool

Demo

Terraform on AWS

Terraform Provider

  • Connects to the cloud's API
  • Defines the resources we can create
AWS Azure Kubernetes
CloudFoundry Vault VMware vSphere
Time DNS TLS

https://registry.terraform.io/browse/providers

Terraform State File

Terraform State File

DO NOT EDIT IT!

Demo

Code a Terraform Solution

The Workshop