terraform/configs/configload
Martin Atkins f001cb8654 command: Fix terraform init -from-module with relative paths
Since our new approach here works by installing with a synthetic module
configuration block, we need to treat relative paths as a special case
for two reasons:

- Relative paths in module addresses are relative to the file containing
  the call rather than the working directory, but -from-module uses the
  working directory (and the call is in a synthetic "file" anyway)

- We need to force Terraform to pass the path through to go-getter rather
  than just treating it as a relative reference, since we really do want
  a copy of the directory in this case, even if it is local.

To address both of these things, we'll detect a relative path and turn it
into an absolute path before beginning installation. This is a bit hacky,
but this is consistent with the general philosophy of the -from-module
implementation where it does hacky things so that the rest of the
installer code can be spared of dealing with its special cases.

This is covered by a couple of existing tests that run init -from-module,
including TestInit_fromModule_dstInSrc which now passes.
2018-11-09 09:48:03 -08:00
..
test-fixtures configs/configload: installer tests inspect their result 2018-02-15 15:56:39 -08:00
copy_dir.go configs/configload: installation from registry and go-getter 2018-02-15 15:56:39 -08:00
doc.go
getter.go configload: Don't download the same module source multiple times 2018-10-16 18:50:29 -07:00
inode.go configs/configload: installation from registry and go-getter 2018-02-15 15:56:39 -08:00
inode_freebsd.go configs/configload: installation from registry and go-getter 2018-02-15 15:56:39 -08:00
inode_windows.go configs/configload: installation from registry and go-getter 2018-02-15 15:56:39 -08:00
loader.go terraform: Ugly huge change to weave in new State and Plan types 2018-10-16 19:11:09 -07:00
loader_init_from_module.go command: Fix terraform init -from-module with relative paths 2018-11-09 09:48:03 -08:00
loader_init_from_module_test.go configs/configload: InitDirFromModule 2018-02-15 15:56:39 -08:00
loader_install.go registry: renaming module-specific registry functions 2018-10-16 18:56:50 -07:00
loader_install_hooks.go configs/configload: installation of local modules 2018-02-15 15:56:38 -08:00
loader_install_test.go configs/configload: installer tests inspect their result 2018-02-15 15:56:39 -08:00
loader_load.go
loader_load_test.go
loader_snapshot.go command: Even more fixes for "apply" command tests 2018-10-16 19:14:11 -07:00
loader_snapshot_test.go configload: Configuration snapshots 2018-10-16 18:50:29 -07:00
loader_test.go configs/configload: installation from registry and go-getter 2018-02-15 15:56:39 -08:00
module_manifest.go configs: use addrs.Module for module path, rather than []string 2018-10-16 18:46:46 -07:00
module_mgr.go Add a `CredentialsForHost` method to disco.Disco 2018-08-03 11:29:11 +02:00
source_addr.go configs/configload: installation from registry and go-getter 2018-02-15 15:56:39 -08:00
testing.go configload: helper functions for tests 2018-10-16 18:24:47 -07:00