1.6 KiB
Terraform
“An open-source infrastructure as code software tool created by HashiCorp¹.”
-
Other products in that space: Pulumi, Cloud Formation...
-
Very rich ecosystem
-
Supports many cloud providers
.footnote[¹Also creators of Consul, Nomad, Packer, Vagrant, Vault...]
Infrastructure as code?
-
Write configuration files that describe resources, e.g.:
- some GKE and Kapsule Kubernetes clusters
- some S3 buckets
- a bunch of Linode/Digital Ocean instances
- ...and more
-
Run
terraform applyto create all these things -
Make changes to the configuration files
-
Run
terraform applyagain to create/update/delete resources
(Vagrant, Packer, Consul, Vault, Nomad...)
- Run
terraform destroyto delete all these things
What Terraform is not
-
It's not a tool to abstract the differences between cloud providers
(“I want to move my AWS workloads to Scaleway!”)
-
It's not a configuration management tool
(“I want to install and configure packages on my servers!”)
-
It's not an application deployment tool
(“I want to deploy a new build of my app!”
-
It can be used for these things anyway (more or less succesfully)
Vocabulary
-
Configuration = a set of Terraform files
-
typically in HCL (HashiCorp Config Language),
.tfextension -
can also be JSON
-
-
Resource = a thing that will be managed by Terraform
- e.g. VM, cluster, load balancer...
-
Provider = plugin to manage a family of resources
-
example:
googleprovider to talk with GCP APIs -
example:
tlsprovider to generate keys
-