Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 278


terraform validate confirms that your infrastructure matches the Terraform state file.

Show Answer
Correct Answer: B

The statement is false. The 'terraform validate' command in Terraform checks whether the configuration files are syntactically and structurally correct. It does not confirm that your infrastructure matches the Terraform state file. To verify if the infrastructure matches the state file, you would typically use the 'terraform plan' command, which shows the difference between the configuration and the current state of infrastructure.

Discussion

2 comments
Sign in to comment
Pete987Option: B
Aug 23, 2023

B. False The statement is not accurate. terraform validate is a command in Terraform that checks whether the configuration files are syntactically and structurally correct. It validates the configuration syntax and structure but does not confirm that your infrastructure matches the Terraform state file. To confirm that your infrastructure matches the Terraform state file, you would typically use commands like terraform plan to compare the current state of your configuration with the state recorded in the Terraform state file. This helps you understand the differences between the desired configuration and the actual infrastructure that Terraform is managing.

heelocoOption: B
Sep 21, 2023

agree Pete987