Introduction to Local Basics
Explore fundamental Terraform concepts focusing on local resource management and state files. Understand key commands such as terraform init, apply, plan, and destroy. Learn to manage resources, module outputs, and practice working with local files to build a strong infrastructure-as-code foundation.
We'll cover the following...
What will we learn?
This section goes over the basic concepts of using Terraform. We’ll study Terraform resources, planning, state files, data sources, output, and destruction.
We’ll be using only local resources, such as local files on the host we run Terraform on, so that these concepts get fully embedded. It won’t necessarily look like the Terraform we might use at work, but it’s fundamentally the same and will give us a good foundation.
We’ll cover the following:
-
In the “Terraform 101” lesson, we’ll walk through one of the simplest possible Terraform scripts. We’ll cover the following topics:
- What are Terraform resources?
- What is the
path.modulevariable? - How does the
terraform initcommand work? - What does the
terraform applycommand do?
-
In the “Terraform State File” lesson, we’ll take a closer look at the state file.
-
In the “Planning with Terraform” lesson, we’ll learn how to do the following:
- Slow the process down a bit to give us more control.
- Cover some new commands like terraform plan and terraform show.
-
In the “Terraform Module Output” lesson, we’ll learn the following actions:
- How data sources allow us to use inputs from outside the module. - How module output allows us to define a Terraform module. -
In the “Terraform Destroy” lesson, we’ll cover the following commands and actions:
- The
terraform plan -destroycommand. - The
terraform destroycommand. - How we can
Taint and untaintresources.
- The