InterviewSolution
| 1. |
Explain the command terraform validate in the context of Terraform. |
|
Answer» The terraform validate command verifies the configuration files in a directory, focusing solely on the configuration and excluding any outside services such as remote state, provider APIs, and so on. Validate performs checks to see if a configuration is syntactically correct and internally CONSISTENT, REGARDLESS of any variables or current state. As a result, it's best used for general verification of reusable modules, such as ensuring that attribute names and value types are correct. This command can be executed automatically, for example as a post-save check in a TEXT editor or as a test step for a reusable module in a continuous integration system. Syntax: terraform validate [options] The following options are available with this command:
|
|