nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-003 · Question #218

Which command does not cause Terraform to refresh its state?

The correct answer is A. terraform state list. terraform state list only displays resources stored in the state file but does not interact with the cloud provider or refresh the state. terraform plan, terraform apply, and terraform destroy compare or modify the infrastructure, so they refresh the state to ensure accuracy.

Manage state

Question

Which command does not cause Terraform to refresh its state?

Options

  • Aterraform state list
  • Bterraform plan
  • Cterraform apply
  • Dterraform destroy

How the community answered

(40 responses)
  • A
    70% (28)
  • B
    3% (1)
  • C
    10% (4)
  • D
    18% (7)

Explanation

terraform state list only displays resources stored in the state file but does not interact with the cloud provider or refresh the state. terraform plan, terraform apply, and terraform destroy compare or modify the infrastructure, so they refresh the state to ensure accuracy.

Topics

#state refresh#terraform state list#terraform plan

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-003 Practice