Skill 3.3.1

What terraform validate checks

Key Concepts

validate parses all .tf files in the directory and checks syntax, block and argument names against provider schemas, argument types, required arguments, and references to variables, resources and modules that do not exist. It reports errors with file and line numbers.

validate does not read state, call provider APIs or evaluate values that come from real infrastructure. It cannot tell you that an image ID does not exist, that a bucket name is taken or that credentials are wrong; those errors appear during plan or apply. Because it needs provider schemas, the providers must be installed first with terraform init.