From 6b6be3af359e9d86fb45be8e16e697651e381fbe Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Mon, 25 Feb 2019 14:02:47 -0800 Subject: [PATCH] command: Remove promise of plan -validate-only from validate docs We brought forward a new implementation of "terraform validate" that was originally scheduled for a later release after finding that it would be simpler than reworking the old implementation for new v0.12 assumptions, but we didn't yet implement "terraform plan -validate-only" in spite of it being mentioned in the updated docs for "terraform validate". For now then, the documentation will make the weaker suggestion of running "terraform plan" to validate a particular _run_ rather than a particular _module_, which is the closest thing we have for now. At some point after v0.12.0 we will evaluate whether a validate-only mode for "terraform plan" (which could then run without configuring the providers at all) is needed. --- command/validate.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/command/validate.go b/command/validate.go index 3041c4785..d34880036 100644 --- a/command/validate.go +++ b/command/validate.go @@ -234,11 +234,6 @@ Usage: terraform validate [options] [dir] state. It is thus primarily useful for general verification of reusable modules, including correctness of attribute names and value types. - To verify configuration in the context of a particular run (a particular - target workspace, operation variables, etc), use the following command - instead: - terraform plan -validate-only - It is safe to run this command automatically, for example as a post-save check in a text editor or as a test step for a re-usable module in a CI system. @@ -250,6 +245,10 @@ Usage: terraform validate [options] [dir] If dir is not specified, then the current directory will be used. + To verify configuration in the context of a particular run (a particular + target workspace, operation variables, etc), use the terraform plan + subcommand instead, which includes an implied validation check. + Options: -json Produce output in a machine-readable JSON format, suitable for