Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Exam Terraform-Associate-003 Topic 7 Question 10 Discussion

Actual exam question for HashiCorp's Terraform-Associate-003 exam
Question #: 10
Topic #: 7
[All Terraform-Associate-003 Questions]

When should you run terraform init?

Show Suggested Answer Hide Answer
Suggested Answer: D

You should runterraform initafter you start coding a new Terraform project and before you runterraform planfor the first time. This command will initialize the working directory by downloading the required providers and modules, creating the initial state file, and performing other necessary tasks.Reference= : Initialize a Terraform Project


Contribute your Thoughts:

Billi
10 days ago
Good point, Rodolfo. I was leaning towards B as well, but you make a valid argument for D. It really depends on the context of the project.
upvoted 0 times
...
Sherron
11 days ago
Haha, I love how they try to trick us with all these options. B is clearly the right answer here.
upvoted 0 times
...
Rodolfo
11 days ago
I'm not so sure. What if you've already started coding and then realize you need to initialize the directory? Wouldn't option D be the correct answer in that case?
upvoted 0 times
...
Nikita
12 days ago
I was considering C, but I think B is the better choice. You want to get the initialization out of the way before you start planning and applying your infrastructure.
upvoted 0 times
...
Noel
12 days ago
I agree with Wei. Running 'terraform init' before you start coding a new project is the best practice. It sets up the Terraform working directory and downloads the necessary providers. Running it later could cause issues.
upvoted 0 times
...
Wei
13 days ago
Hmm, this question seems pretty straightforward. I think the answer is B - 'Before you start coding a new Terraform project'. That's when you need to initialize the Terraform working directory, right?
upvoted 0 times
...
Sylvia
13 days ago
Definitely B. Running init before you start coding ensures that all the required components are in place and ready to go.
upvoted 0 times
...
Melissia
14 days ago
I was a bit confused by the options at first, but I think B makes the most sense. You need to run init before you even start writing your Terraform code.
upvoted 0 times
...
Mila
16 days ago
I agree with Bettyann. Terraform init is the first step you should take when starting a new project. It initializes the working directory and downloads the necessary provider plugins.
upvoted 0 times
...
Bettyann
18 days ago
This is a pretty straightforward question about when to run terraform init. I think the correct answer is B) Before you start coding a new Terraform project.
upvoted 0 times
...

Save Cancel