Therefore, the correct answer is C. You should run terraform init after you start coding a new Terraform project and before you run terraform plan for the first time. This ensures that the necessary provider plugins and modules are downloaded and installed, and that the backend is set up correctly. Running terraform init after coding the project ensures that Terraform has the correct dependencies and can properly execute the configuration.
Option A is incorrect because running terraform init after the first terraform apply can lead to errors, as not all necessary dependencies may have been installed.
Option B is incorrect because running terraform init after the first terraform plan can result in missing provider plugins or modules needed to complete the plan.
Option D is incorrect because terraform init is used to initialize a Terraform working directory that already exists. It cannot be used to create a new Terraform project.
After writing code and before Plan we should execute INIT to import plugins or modules..etc
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Tlakmini
1 year, 3 months agoJhaggar
1 year, 6 months agotbhtp
1 year, 7 months agomicropbl4
1 year, 7 months agocamps
1 year, 8 months agoRavi528
1 year, 8 months ago