TA-002-P · Question #374
terraform validate reports HCL syntax errors.
The correct answer is A. True. The terraform validate command checks for syntax errors within Terraform configuration files and also performs basic semantic validation.
Question
terraform validate reports HCL syntax errors.
Options
- ATrue
- BFalse
How the community answered
(34 responses)- A88% (30)
- B12% (4)
Why each option
The terraform validate command checks for syntax errors within Terraform configuration files and also performs basic semantic validation.
The terraform validate command performs checks to ensure that the configuration files are syntactically valid HCL (HashiCorp Configuration Language) and that they adhere to Terraform's general structural rules, including detecting syntax errors. It also performs some semantic validation, such as checking for valid attribute names and types where possible without needing external API calls.
This statement is false because terraform validate is specifically designed to identify and report syntax errors in the HCL code.
Concept tested: Terraform configuration validation
Source: https://developer.hashicorp.com/terraform/cli/commands/validate
Topics
Community Discussion
No community discussion yet for this question.