terraform/command/test-fixtures/validate-invalid
Martin Atkins bfd9392eb8 command: beginnings of new config loader in "terraform validate"
As part of some light reorganization of our commands, this new
implementation no longer does validation of variables and will thus avoid
the need to spin up a fully-valid context. Instead, its focus is on
validating the configuration itself, regardless of any variables, state,
etc.

This change anticipates us later adding a -validate-only flag to
"terraform plan" which will then take over the related use-case of
checking if a particular execution of Terraform is valid, _including_ the
state, variables, etc.

Although leaving variables out of validate feels pretty arbitrary today
while all of the variable sources are local anyway, we have plans to
allow per-workspace variables to be stored in the backend in future and
at that point it will no longer be possible to fully validate variables
without accessing the backend. The "terraform plan" command explicitly
requires access to the backend, while "terraform validate" is now
explicitly for local-only validation of a single module.

In a future commit this will be extended to do basic type checking of
the configuration based on provider schemas, etc.
2018-10-16 18:20:32 -07:00
..
incorrectmodulename Added verify command 2016-02-08 12:48:14 +01:00
interpolation Added verify command 2016-02-08 12:48:14 +01:00
missing_defined_var command/validate: Add flag to check that all variables are specified (#13872) 2017-07-05 17:32:29 +01:00
missing_quote Added verify command 2016-02-08 12:48:14 +01:00
missing_var Added verify command 2016-02-08 12:48:14 +01:00
multiple_modules command: beginnings of new config loader in "terraform validate" 2018-10-16 18:20:32 -07:00
multiple_providers Added verify command 2016-02-08 12:48:14 +01:00
multiple_resources Added verify command 2016-02-08 12:48:14 +01:00
outputs Added verify command 2016-02-08 12:48:14 +01:00
main.tf command: beginnings of new config loader in "terraform validate" 2018-10-16 18:20:32 -07:00