Terraform
Terrible or Formidable?
Hello!
James Kingsmill
DevOp at Geoscience Australia
twitter: @jameskingsmill
hangops/github/bitbucket: aynsof
What is Terraform?
- Infrastructure as code
- Desired state
- Orchestration
Why infracode?
- Enable change
- Divergent environments
- Recover from failure
- Replicable architectures
Terraform - gory details
- HashiCorp
- Go
- OSS on Github
- 7600 stars
- 900 contributors
- 17,000 commits
Who is HashiCorp?
- Vagrant, Packer, Consul,
Serf, Nomad, Vault
- ‘We've never lost 9s betting on a
HashiCorp product.’ - Mozilla
- ‘HashiCorp is Atlassian for DevOps’ -
Some Person
Why do I care?
- Simple and easy(ish)
- Modular
- State storage, statefile locking
- Planning
- Automatic dependency management
- Open source
- Platform agnostic
How platform agnostic?
- AWS
- Google Cloud Platform
- Microsoft Azure
- Bare metal
- Alibaba Cloud
- Plus Many More
PostgreSQL
PowerDNS
ProfitBricks
RabbitMQ
Rancher
Random
Rundeck
Scaleway
SoftLayer
StatusCake
Spotinst
Template
Terraform
Terraform Enterprise
TLS
Triton
UltraDNS
Vault
VMware vCloud Director
VMware vSphere
GitHub
Google Cloud
Grafana
Heroku
Icinga2
Ignition
InfluxDB
Kubernetes
Librato
Logentries
Mailgun
New Relic
Nomad
NS1
Microsoft Azure
Microsoft Azure (Legacy ASM)
MySQL
OpenStack
OpsGenie
Packet
PagerDuty
Alicloud
Archive
Arukas
AWS
Bitbucket
CenturyLinkCloud
Chef
Circonus
Cloudflare
CloudStack
Cobbler
Consul
Datadog
DigitalOcean
DNS
DNSMadeEasy
DNSimple
Docker
Dyn
External
Fastly
How platform agnostic?
GA’s infracode journey
- AusPost and InfraViewer
- Amazonia
- Re-evaluation
Alternatives
Cloudformation
- Declarative
- JSON
- Lock-in
Alternatives
Troposphere/Sparkleformation/Amazonia
- Improvement on Cloudformation
- Smaller communities
- 150 contributors
- 14 contributors
- ~2 contributors
Alternatives
Ansible
- Limited support for AWS
- Procedural
How does it work?
- Hashicorp Configuration Language
- Human readable
- JSON compatible
What does it look like?
What does it look like?
What does it look like?
Run it!
terraform init
terraform get
terraform plan
terraform apply
Live demo
Running in production
- Pipelines
- Automated testing
Running in production
Automated testing
Automated testing
Issues?
- Declarative to the death
Issues?
- Heavy duty
- Terragrunt
- TF 0..9
- State files
- Cleanup
- Stardust
Advice?
- Treat modules as functions
- Tag resources and use a cleanup script
- Separate state files
- Automated tests (duh)
Formidable.
- Buying in
- Auscors
- Geoscience Portal, eCat, Earthquakes, Sentinel
- Self-serve
- Workshops & example architectures
- Ecosystem
Learning more
- Terraform: Up and Running - Yevgeniy Brikman (O’Reilly)
- charity.wtf - Charity Majors (@mipsytipsy)
- hangops - #terraform
Thanks!
James Kingsmill
twitter: @jameskingsmill
hangops/github/bitbucket: aynsof

Terraform: Terrible or Formidable