terraform/internal/getproviders
Martin Atkins ce67a818db internal/getproviders: Allow basedir for local search to be symlink
The SearchLocalDirectory function was intentionally written to only
support symlinks at the leaves so that it wouldn't risk getting into an
infinite loop traversing intermediate symlinks, but that rule was also
applying to the base directory itself.

It's pretty reasonable to put your local plugins in some location
Terraform wouldn't normally search (e.g. because you want to get them from
a shared filesystem mounted somewhere) and creating a symlink from one
of the locations Terraform _does_ search is a convenient way to help
Terraform find those without going all in on the explicit provider
installation methods configuration that is intended for more complicated
situations.

To allow for that, here we make a special exception for the base
directory, resolving that first before we do any directory walking.

In order to help with debugging a situation where there are for some
reason symlinks at intermediate levels inside the search tree, we also now
emit a WARN log line in that case to be explicit that symlinks are not
supported there and to hint to put the symlink at the top-level if you
want to use symlinks at all.

(The support for symlinks at the deepest level of search is not mentioned
in this message because we allow it primarily for our own cache linking
behavior.)
2020-08-18 14:28:50 -07:00
..
testdata internal/getproviders: Allow basedir for local search to be symlink 2020-08-18 14:28:50 -07:00
doc.go internal/getproviders: Query a provider registry 2020-01-10 09:41:27 -08:00
errors.go command/init: add e2e tests for provider not found messages 2020-05-20 11:04:11 -04:00
filesystem_mirror_source.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
filesystem_mirror_source_test.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
filesystem_search.go internal/getproviders: Allow basedir for local search to be symlink 2020-08-18 14:28:50 -07:00
filesystem_search_test.go internal/getproviders: Allow basedir for local search to be symlink 2020-08-18 14:28:50 -07:00
hash.go internal/getproviders: Package hashing for local filesystem packages 2020-06-01 14:49:43 -07:00
http_mirror_source.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
legacy_lookup.go command: Rework 0.13upgrade sub-command 2020-05-07 11:38:55 -04:00
legacy_lookup_test.go internal: Fix LookupLegacyProvider 2020-05-08 12:29:25 -04:00
memoize_source.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
memoize_source_test.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
mock_source.go getproviders: FakeInstallablePackageMeta filename 2020-07-07 15:18:30 -04:00
multi_source.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
multi_source_test.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
package_authentication.go Modify language for reporting signing state 2020-05-26 13:14:05 -04:00
package_authentication_test.go Modify language for reporting signing state 2020-05-26 13:14:05 -04:00
public_keys.go internal: Verify provider signatures on install 2020-04-17 13:57:19 -04:00
registry_client.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
registry_client_test.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
registry_source.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
registry_source_test.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
source.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00
types.go internal/getproviders: decode and return any registry warnings (#25337) 2020-06-25 10:49:48 -04:00