TERRAFORM-ASSOCIATE-004 · Question #17
What is the workflow for deploying new infrastructure with Terraform?
The correct answer is A. Write Terraform configuration, run terraform init to initialize the working directory or workspace,. The standard Terraform workflow is: (1) Write configuration files, (2) run terraform init to initialize the working directory and download required providers/modules, (3) run terraform plan to preview the changes Terraform will make, and (4) run terraform apply to provision the i
Question
Options
- AWrite Terraform configuration, run terraform init to initialize the working directory or workspace,
- BWrite Terraform configuration, run terraform show to view proposed changes, and terraform apply
- CWrite Terraform configuration, run terraform apply to create infrastructure, use terraform validate
- DWrite Terraform configuration, run terraform plan to initialize the working directory or workspace,
How the community answered
(49 responses)- A94% (46)
- C4% (2)
- D2% (1)
Explanation
The standard Terraform workflow is: (1) Write configuration files, (2) run terraform init to initialize the working directory and download required providers/modules, (3) run terraform plan to preview the changes Terraform will make, and (4) run terraform apply to provision the infrastructure. Option A correctly describes this sequence. Option B incorrectly uses terraform show as a planning step. Option C applies before validating. Option D confuses terraform plan with the initialization step that belongs to terraform init.
Topics
Community Discussion
No community discussion yet for this question.