Which of the following is not an action performed by terraform init?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

Which of the following is not an action performed by terraform init?

Explanation:
Terraform init prepares a working directory for Terraform by wiring up the environment you’ve defined: it initializes any configured backend, loads the required provider plugins, and fetches the sources for any referenced modules. This means it sets up remote state support when you’ve specified a backend, makes sure the exact provider versions needed by your configuration are available, and downloads module code so subsequent commands like plan and apply can run smoothly. It does not create new configuration files like a sample main.tf; that kind of scaffolding comes from templates or manual setup outside the initialization step. So the action that doesn’t fit with what init does is creating a sample main.tf file.

Terraform init prepares a working directory for Terraform by wiring up the environment you’ve defined: it initializes any configured backend, loads the required provider plugins, and fetches the sources for any referenced modules. This means it sets up remote state support when you’ve specified a backend, makes sure the exact provider versions needed by your configuration are available, and downloads module code so subsequent commands like plan and apply can run smoothly. It does not create new configuration files like a sample main.tf; that kind of scaffolding comes from templates or manual setup outside the initialization step. So the action that doesn’t fit with what init does is creating a sample main.tf file.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy