TA-002-P · Question #415
Terraform console provides an interactive command-line console for evaluating and experimenting with expressions. You can use it to test interpolations before using them in configurations and to…
The correct answer is D. Declaring a resource identifier more than once. terraform validate checks the configuration files for internal consistency and correctness - it validates syntax, required arguments, attribute types, and resource/module references without accessing any remote state or APIs. Declaring a resource identifier more than once is…
Question
Terraform console provides an interactive command-line console for evaluating and experimenting with expressions. You can use it to test interpolations before using them in configurations and to interact with any values currently saved in state. Which configuration consistency errors does terraform validate report?
Options
- AA mix of spaces and tabs in configuration files
- BDifferences between local and remote state
- CTerraform module isn't the latest version
- DDeclaring a resource identifier more than once
How the community answered
(31 responses)- A3% (1)
- B6% (2)
- C3% (1)
- D87% (27)
Explanation
terraform validate checks the configuration files for internal consistency and correctness - it validates syntax, required arguments, attribute types, and resource/module references without accessing any remote state or APIs. Declaring a resource identifier more than once is exactly the kind of configuration error it catches. It does NOT check whitespace or formatting (that is terraform fmt). It does NOT compare local vs. remote state (that is terraform plan). It does NOT check if modules are up to date. Answer D is correct.
Topics
Community Discussion
No community discussion yet for this question.