terraform/command/e2etest/testdata
Martin Atkins efe78b2910 main: new global option -chdir
This new option is intended to address the previous inconsistencies where
some older subcommands supported partially changing the target directory
(where Terraform would use the new directory inconsistently) where newer
commands did not support that override at all.

Instead, now Terraform will accept a -chdir command at the start of the
command line (before the subcommand) and will interpret it as a request
to direct all actions that would normally be taken in the current working
directory into the target directory instead. This is similar to options
offered by some other similar tools, such as the -C option in "make".

The new option is only accepted at the start of the command line (before
the subcommand) as a way to reflect that it is a global command (not
specific to a particular subcommand) and that it takes effect _before_
executing the subcommand. This also means it'll be forced to appear before
any other command-specific arguments that take file paths, which hopefully
communicates that those other arguments are interpreted relative to the
overridden path.

As a measure of pragmatism for existing uses, the path.cwd object in
the Terraform language will continue to return the _original_ working
directory (ignoring -chdir), in case that is important in some exceptional
workflows. The path.root object gives the root module directory, which
will always match the overriden working directory unless the user
simultaneously uses one of the legacy directory override arguments, which
is not a pattern we intend to support in the long run.

As a first step down the deprecation path, this commit adjusts the
documentation to de-emphasize the inconsistent old command line arguments,
including specific guidance on what to use instead for the main three
workflow commands, but all of those options remain supported in the same
way as they were before. In a later commit we'll make those arguments
produce a visible deprecation warning in Terraform's output, and then
in an even later commit we'll remove them entirely so that -chdir is the
single supported way to run Terraform from a directory other than the
one containing the root module configuration.
2020-09-04 15:31:08 -07:00
..
chdir-option/subdir main: new global option -chdir 2020-09-04 15:31:08 -07:00
custom-provider-install-method main: Properly handle provider installation method exclusions 2020-04-23 10:52:01 -07:00
empty Standardise directory name for test data 2019-06-30 10:16:15 +02:00
full-workflow-null Standardise directory name for test data 2019-06-30 10:16:15 +02:00
local-only-provider main: skip direct provider installation for providers available locally 2020-04-17 13:55:11 -07:00
plugin-cache internal/providercache: Fix incorrect logic in Installer.SetGlobalCacheDir 2020-04-06 09:24:23 -07:00
provider-not-found command/init: add e2e tests for provider not found messages 2020-05-20 11:04:11 -04:00
provider-warnings internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
template-provider Standardise directory name for test data 2019-06-30 10:16:15 +02:00
terraform-provider e2e test for remote state read 2020-06-24 14:09:59 -04:00
terraform-providers-mirror command: terraform providers mirror 2020-06-01 14:49:43 -07:00
test-provider command: Unmanaged providers 2020-05-26 17:48:57 -07:00
vendored-provider command/init: Move "vendored provider" test to e2etests 2020-04-06 09:24:23 -07:00