nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #268

Which of the following Terraform commands will automatically refresh the state unless supplied with additional flags or arguments? (Choose TWO correct answers)

The correct answer is A. terraform plan C. terraform apply. terraform plan and terraform apply both perform an automatic state refresh by default before executing, reconciling Terraform's recorded state with the actual state of real infrastructure. This ensures the execution plan is based on current real-world conditions. terraform…

Submitted by daniela_cl· Apr 18, 2026Manage Terraform State

Question

Which of the following Terraform commands will automatically refresh the state unless supplied with additional flags or arguments? (Choose TWO correct answers)

Options

  • Aterraform plan
  • Bterraform state
  • Cterraform apply
  • Dterraform validate
  • Eterraform output

How the community answered

(35 responses)
  • A
    91% (32)
  • B
    6% (2)
  • D
    3% (1)

Explanation

terraform plan and terraform apply both perform an automatic state refresh by default before executing, reconciling Terraform's recorded state with the actual state of real infrastructure. This ensures the execution plan is based on current real-world conditions. terraform validate only checks the configuration syntax and structure - it does not interact with the state or providers. terraform state is a subcommand group for manual state manipulation and does not auto-refresh. terraform output reads values from the existing state file without refreshing it.

Topics

#Terraform CLI#State Refresh#terraform plan#terraform apply

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice