Terraform: Zero to Confident

0%
terraform-lab, bash
Welcome to the DevOpsLesson Terraform Lab 🟣
This is a safe, simulated Terraform environment. Nothing real is provisioned.
Follow the steps on the left. Type a command below, or type 'help' anytime.
 
devops@terraform-lab:~$

Every command this lab teaches

Terraform: Zero to Confident is 11 steps, about 25 minutes. Each one asks a question, you type the answer in the terminal above, and it is checked before you move on. Nothing is installed and nothing can break.

Beginner5 steps

  1. Print the installed Terraform version.terraform version
  2. Create a main.tf file that declares one resource.echo 'resource "local_file" "hello" { filename = "hello.txt" content = "Hello, Terraform!" }' > main.tf
  3. Initialize the working directory.terraform init
  4. Rewrite the configuration files into canonical style.terraform fmt
  5. Validate the configuration.terraform validate

Intermediate3 steps

  1. Generate an execution plan.terraform plan
  2. Apply the configuration to create your resource.terraform apply -auto-approve
  3. List the resources recorded in state.terraform state list

Advanced3 steps

  1. Add an output block, then apply again so it is computed.echo 'output "file_path" { value = local_file.hello.filename }' >> main.tf
  2. Show the output values from state.terraform output
  3. Destroy all managed resources.terraform destroy -auto-approve