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 workïŹow 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 - oïŹcial documentation
âȘ Plugin SDK - now oïŹcially separated from core
âȘ Creating a Terraform Provider for Just About Anything by Eddie
Zanewski
âȘ Check out other providers like AWS or GCP!