TA-002-P · Question #353
terraform validate validate validates that your infrastructure matches the Terraform state file.
The correct answer is B. False. False. 'terraform validate' checks that your configuration files are syntactically valid and internally consistent - it verifies that resource types exist, required arguments are provided, and references are valid. It does NOT compare your infrastructure against the state file or
Question
terraform validate validate validates that your infrastructure matches the Terraform state file.
Options
- ATrue
- BFalse
How the community answered
(23 responses)- A4% (1)
- B96% (22)
Explanation
False. 'terraform validate' checks that your configuration files are syntactically valid and internally consistent - it verifies that resource types exist, required arguments are provided, and references are valid. It does NOT compare your infrastructure against the state file or against live cloud resources. To reconcile state with real infrastructure, use 'terraform refresh' (or 'terraform apply -refresh-only'). To see what changes would be made, use 'terraform plan'.
Topics
Community Discussion
No community discussion yet for this question.