Terraform is an Infrastructure as Code tool for declaratively building and maintaining complex infrastructures on one or more cloud providers/services. But Terraform also supports over 80 non-infrastructure providers! In this demo-driven talk, will dive into the internals of Terraform and see how it works. We will show how Terraform can be used for non-infrastructure use cases by showing examples. We’ll also take a look at on how you can extend Terraform to manage anything with an API.
11. Infrastructure-as-Code Goals
▪ Unify the view of resources
▪ Support the modern data center (IaaS, PaaS, SaaS)
▪ Expose a way for individuals and teams to safely and predictably
change infrastructure
▪ Provide a workflow that is technology agnostic
▪ Manage anything with an API
11
12. “I don’t know how to code. But I do want
to automate how I configure my
infrastructure.”
- An Infrastructure Engineer Who Started Using Public Cloud
12
13. “It was hard enough for me to learn
infrastructure terms but writing code for
it too? Difficult.”
- A Developer Who Started Using Public Cloud
13
14. Terraform
HashiCorp Configuration
Language
CODE EDITOR
resource "google_compute_instance" "default" {
name = "test"
machine_type = "n1-standard-1"
zone = "us-central1-a"
tags = ["foo", "bar"]
boot_disk {
initialize_params {
image = "debian-cloud/debian-9"
}
}
// Local SSD disk
scratch_disk {
}
network_interface {
network = "default"
access_config {
// Ephemeral IP
}
14
16. TERMINAL
+ resource will be created
- resource will be destroyed
~ resource will be updated in-place
-/+ resources will be destroyed and re-created
16
21. Let’s build a provider.
github.com/joatmon08/2019-demo-ato
22. Useful Resources
▪ Writing Custom Providers - official documentation
▪ Plugin SDK - now officially separated from core
▪ Creating a Terraform Provider for Just About Anything by Eddie
Zanewski
▪ Check out other providers like AWS or GCP!