CertKeen

Terraform Associate (004) · Free practice question 1 of 12

Skipping refresh during plan

Plans at Ashby Cartography take a long time because Terraform reads hundreds of objects from the provider API before planning. An engineer wants a quick plan that relies only on the current state, accepting that drift will not be detected. Which option does this?

  1. A.terraform plan -refresh=false
  2. B.terraform plan -refresh-only
  3. C.terraform plan -lock=false
  4. D.terraform plan -compact-warnings
Show answer and explanation

Correct answer: A. terraform plan -refresh=false

Why: By default, plan first refreshes state by reading remote objects; -refresh=false skips that step, which is faster but can miss changes made outside Terraform. A refresh-only plan does the opposite, focusing only on syncing state with remote objects. Disabling locking or compacting warnings does not skip the refresh.

More free Terraform Associate (004) questions