The Discover module takes you from zero to a first complete Terraform cycle: you understand what the tool is for, you install it on Linux, then you create and destroy a virtual machine with init, plan, apply and destroy. It also sets up the vocabulary that comes back in every example of the course. No prior knowledge of Terraform is needed. You need a Linux terminal. The full-cycle example runs on KVM/libvirt, and the workflow page details how to prepare it; without KVM, the lab of the introduction page already lets you observe a first cycle on a local configuration.
What you will learn
- Explain what Terraform is for and what it does not do.
- Install Terraform 1.17.2 on Linux and check the installation.
- Run the
init,validate,plan,apply,destroycycle and read a plan. - Tell a provider, a resource and a data source apart.
- Organize the files of a project and find your way around the CLI commands.
In what order should you read the pages?
The module follows the order of the course outline, and each page builds on the ones before it. It comes first because it needs neither a cloud account nor any knowledge of Terraform.
The page What is Terraform? states the problem: scripts that have no memory and environments that end up drifting apart. It shows what Terraform brings. Install Terraform then gives you a working tool: you choose an installation method, install version 1.17.2 used in the examples and check it with terraform version.
The Terraform workflow runs the complete cycle on a real example, and explains the state, the file where Terraform records what it has created. The page Providers, resources and data sources then names the three types of blocks you have just come across in that example.
The structure of a Terraform project puts those blocks into files. Declarative versus imperative explains why you describe the result you want rather than the sequence of actions. The Terraform CLI gathers the commands you will use over and over. Terraform vs OpenTofu compares Terraform with its open source fork, and a quiz closes the module.
What does the Discover module leave out?
The module gives the framework, not the detail. Writing HCL code (variables, expressions, modules), the state in depth and managing several environments have their own modules later in the course. If the order of the commands or the role of the state still escapes you at the end of the module, reread the workflow page before moving on.
Key takeaways
- A complete cycle fits in four commands,
init,plan,applyanddestroy(validatecomes in before the plan), and you read the plan before applying. - Provider, resource and data source are the vocabulary of every example in the course.
- The module gives the framework; the HCL code, the state in depth and the environments have their own modules.