terraform/internal/getproviders
Martin Atkins 4d7122a0dd internal/getproviders: LookupLegacyProvider
This is a temporary helper so that we can potentially ship the new
provider installer without making a breaking change by relying on the
old default namespace lookup API on the default registry to find a proper
FQN for a legacy provider provider address during installation.

If it's given a non-legacy provider address then it just returns the given
address verbatim, so any codepath using it will also correctly handle
explicit full provider addresses. This also means it will automatically
self-disable once we stop using addrs.NewLegacyProvider in the config
loader, because there will therefore no longer be any legacy provider
addresses in the config to resolve. (They'll be "default" provider
addresses instead, assumed to be under registry.terraform.io/hashicorp/* )

It's not decided yet whether we will actually introduce the new provider
in a minor release, but even if we don't this API function will likely be
useful for a hypothetical automatic upgrade tool to introduce explicit
full provider addresses into existing modules that currently rely on
the equivalent to this lookup in the current provider installer.

This is dead code for now, but my intent is that it would either be called
as part of new provider installation to produce an address suitable to
pass to Source.AvailableVersions, or it would be called from the
aforementioned hypothetical upgrade tool.

Whatever happens, these functions can be removed no later than one whole
major release after the new provider installer is introduced, when
everyone's had the opportunity to update their legacy unqualified
addresses.
2020-01-22 09:02:22 -08:00
..
doc.go internal/getproviders: Query a provider registry 2020-01-10 09:41:27 -08:00
errors.go internal/getproviders: Query a provider registry 2020-01-10 09:41:27 -08:00
filesystem_mirror_source.go internal/getproviders: Stub out the two mirror sources 2020-01-10 09:41:27 -08:00
http_mirror_source.go internal/getproviders: Stub out the two mirror sources 2020-01-10 09:41:27 -08:00
legacy_lookup.go internal/getproviders: LookupLegacyProvider 2020-01-22 09:02:22 -08:00
legacy_lookup_test.go internal/getproviders: LookupLegacyProvider 2020-01-22 09:02:22 -08:00
memoize_source.go internal/getproviders: MemoizeSource for local caching of source responses 2020-01-10 09:41:27 -08:00
multi_source.go internal/getproviders: LookupLegacyProvider 2020-01-22 09:02:22 -08:00
registry_client.go internal/getproviders: LookupLegacyProvider 2020-01-22 09:02:22 -08:00
registry_client_test.go internal/getproviders: LookupLegacyProvider 2020-01-22 09:02:22 -08:00
registry_source.go internal/getproviders: LookupLegacyProvider 2020-01-22 09:02:22 -08:00
registry_source_test.go internal/getproviders: Package URL should always be absolute 2020-01-10 09:41:27 -08:00
source.go internal/getproviders: Source interface for generalization 2020-01-10 09:41:27 -08:00
types.go internal/getproviders: Distinguished packed vs. unpacked local packages 2020-01-10 09:41:27 -08:00