Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 118


You have just developed a new Terraform configuration for two virtual machines with a cloud provider. You would like to create the infrastructure for the first time.

Which Terraform command should you run first?

Show Answer
Correct Answer: D

When working with Terraform for the first time, the initial step is to run the 'terraform init' command. This command initializes the working directory containing Terraform configuration files, downloading necessary provider plugins and modules, and setting up the backend configuration. It prepares your environment for the subsequent execution of Terraform commands such as 'terraform plan' and 'terraform apply'.

Discussion

10 comments
Sign in to comment
BurakkoOption: D
Sep 1, 2022

terraform init if you want to run it for the first time.

bora4motionOption: D
Sep 1, 2022

I go with D. init

kprodOption: D
Sep 5, 2022

D - init

legendary7Option: D
Sep 29, 2022

D You need to initialize so all the provider plugin and configurations dependencies get initialized

adoubanOption: D
Dec 12, 2022

Terraform init

ManguuOption: D
Mar 22, 2023

This will initialize the working directory containing the TF config files

Ravi528Option: D
Mar 28, 2023

First we should run terraform init

Ni33Option: D
May 9, 2023

If it is first time then Terraform init command.

PikopoOption: D
Oct 2, 2023

D is correct

090200fOption: D
Jul 15, 2024

keyword is for the first time: so terraform init is correct ans option : D