nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #231

What is modified when executing Terraform in refresh-only mode?

The correct answer is C. Your state file.. In refresh-only mode (terraform apply -refresh-only), Terraform updates the state file to match the actual infrastructure without modifying resources. A (Terraform configuration) - Not modified in refresh-only mode. B (Terraform plan) - Plan is generated but not modified. D (Clou

Submitted by weili_xi· Apr 18, 2026Manage Terraform State

Question

What is modified when executing Terraform in refresh-only mode?

Options

  • AYour Terraform configuration.
  • BYour Terraform plan.
  • CYour state file.
  • DYour cloud infrastructure.

How the community answered

(45 responses)
  • A
    7% (3)
  • B
    4% (2)
  • C
    87% (39)
  • D
    2% (1)

Explanation

In refresh-only mode (terraform apply -refresh-only), Terraform updates the state file to match the actual infrastructure without modifying resources. A (Terraform configuration) - Not modified in refresh-only mode. B (Terraform plan) - Plan is generated but not modified. D (Cloud infrastructure) - Not modified in refresh-only mode.

Topics

#Terraform CLI#State management#Refresh-only mode

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice