Course outlines for learning terraform.
expected time | requirements |
---|---|
60 minutes | none |
Goal: Understand what Infrastructure as code is.
What is the problem IaC is trying to solve?
Not specifically Terraform, but IaC (Infrastructure as Code) in general has these benefits:
There are some drawback too:
Let’s learn a bit more on Terraform:
There are many providers and modules.
Terraform keeps state. State is sort of a book-keeping of what Terraform has created. This means it can compare the (local) state to the desired state, making deployment faster and allowing users to clean-up resources remove from the configuration. This also allows people or teams to collaborate.
+----- Team A ------+ +----- Team B ------+
| resources.tf | | resources.tf |
| terraform.tfstate | | terraform.tfstate |
+-------------------+ +-------------------+
| |
V V
+------------- Cloud provider X --------------+
| +--- instance A ---+ +--- instance B ---+ |
| | | | | |
| +------------------+ +------------------+ |
+---------------------------------------------+
Having state means Terraform will remove resources that are not described anymore.
Actually; let’s create your machines.
You are free to use this machine. If you’d like to run Terraform from another machine, maybe your laptop, please install Terraform.
There is no clear answer to this question. I suggest to use the right tool for the type of work. Most companies use Terraform and some other configuration management system, for example.
In other words, just Terraform is not always sufficient.