CertLumen

HashiCorp Terraform Associate (004) · Section 3 · 12% of the exam

Describe the Terraform workflow

One of the objectives of the HashiCorp Certified: Terraform Associate (004) exam, in the section “Core Terraform workflow”. Here is what it covers, the points to remember and a question to try.

What it covers

Terraform follows a write, plan, apply loop, and every working directory must be initialized first. This lesson shows where each command fits, what terraform init installs and creates, how the dependency lock file pins providers, and which init options the exam expects you to know.

Points to remember

  • The workflow is write, plan, apply; init comes first in any new or cloned directory.
  • terraform init initializes the backend, installs modules and providers, and writes .terraform.lock.hcl.
  • Init is safe to repeat and never changes infrastructure.
  • The lock file tracks provider versions and checksums only (not modules) and is committed to version control.
  • terraform init -upgrade ignores the lock file selections and takes the newest versions allowed by the constraints.

Try a question

Which of the following best summarizes the core Terraform workflow described by HashiCorp?

  1. APlan the changes, write the configuration, then destroy the old resources
  2. BInitialize, destroy, apply and then validate
  3. CApply the changes, review them, then plan the next release
  4. DWrite the configuration, plan the changes, then apply them
Show the answer

D. The three-step loop is write, plan, apply. Init prepares a directory, validate and fmt keep the code correct and tidy, and destroy removes managed infrastructure.

Written for practice in the style of the exam: never a question from the real exam.

In the course

The lesson The Terraform workflow and terraform init teaches this objective (about 35 minutes), and 12 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.

More in this section

← Previous objective · All 37 objectives · Next objective →