nerdexam
HashiCorp

TA-002-P · Question #430

When do you need to explicitly execute terraform refresh?

The correct answer is D. None of the above. Wherever possible, avoid using terraform refresh explicitly and instead rely on Terraform's behavior of automatically refreshing existing objects as part of creating a normal plan.

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

When do you need to explicitly execute terraform refresh?

Options

  • ABefore every terraform plan
  • BBefore every terraform apply
  • CBefore every terraform import
  • DNone of the above

How the community answered

(64 responses)
  • A
    8% (5)
  • B
    2% (1)
  • C
    5% (3)
  • D
    86% (55)

Explanation

Wherever possible, avoid using terraform refresh explicitly and instead rely on Terraform's behavior of automatically refreshing existing objects as part of creating a normal plan.

Topics

#terraform refresh#terraform plan#terraform apply#Terraform CLI

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice