This document discusses using Terraform to implement infrastructure as code and extending Terraform capabilities. It describes how Terraform allows configuring and provisioning infrastructure through code in a declarative way. It then discusses how a provider was built to manage Medium blog posts and images as code. The presentation encourages thinking about supporting other domains as code through custom providers that integrate with APIs.
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!