nerdexam
HashiCorpHashiCorp

TA-002-P · Question #23

TA-002-P Question #23: Real Exam Question with Answer & Explanation

The correct answer is B: Apply. To provision new infrastructure with Terraform, you must first initialize the working directory and then apply the planned changes.

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

Question

Which two steps are required to provision new infrastructure in the Terraform workflow? (Choose two.)

Options

  • ADestroy
  • BApply
  • CImport
  • DInit
  • EValidate

Explanation

To provision new infrastructure with Terraform, you must first initialize the working directory and then apply the planned changes.

Common mistakes.

  • A. terraform destroy removes all the infrastructure managed by a given Terraform configuration, which is the opposite of provisioning new infrastructure.
  • C. terraform import is used to bring existing infrastructure under Terraform management, not to provision new infrastructure from scratch.
  • E. terraform validate checks the syntax and configuration logic of Terraform files but does not provision any infrastructure itself.

Concept tested. Terraform core workflow commands

Reference. https://developer.hashicorp.com/terraform/cli/commands/workflow

Topics

#Terraform workflow#Provisioning infrastructure#terraform init#terraform apply

Community Discussion

No community discussion yet for this question.

Full TA-002-P PracticeBrowse All TA-002-P Questions