nerdexam
HashiCorp

TA-002-P · Question #206

What happens when a terraform apply command is executed?

The correct answer is B. Applies the changes required in the target infrastructure in order to reach the desired. terraform apply executes the changes defined in a Terraform plan to reach the desired state of the infrastructure. It provisions, modifies, or destroys resources as needed. Option A describes terraform plan, Option C describes terraform init, and Option D describes terraform refr

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

Question

What happens when a terraform apply command is executed?

Options

  • ACreates the execution plan for the deployment of resources.
  • BApplies the changes required in the target infrastructure in order to reach the desired
  • CThe backend is initialized and the working directory is prepped.
  • DReconciles the state Terraform knows about with the real-world infrastructure.

How the community answered

(59 responses)
  • A
    2% (1)
  • B
    90% (53)
  • C
    7% (4)
  • D
    2% (1)

Explanation

terraform apply executes the changes defined in a Terraform plan to reach the desired state of the infrastructure. It provisions, modifies, or destroys resources as needed. Option A describes terraform plan, Option C describes terraform init, and Option D describes terraform refresh.

Topics

#terraform apply#infrastructure deployment#desired state#Terraform CLI

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice