terraform/internal/providercache
Martin Atkins ae080481c0 internal/providercache: Installer records its selections in a file
Just as with the old installer mechanism, our goal is that explicit
provider installation is the only way that new provider versions can be
selected.

To achieve that, we conclude each call to EnsureProviderVersions by
writing a selections lock file into the target directory. A later caller
can then recall the selections from that file by calling SelectedPackages,
which both ensures that it selects the same set of versions and also
verifies that the checksums recorded by the installer still match.

This new selections.json file has a different layout than our old
plugins.json lock file. Not only does it use a different hashing algorithm
than before, we also record explicitly which version of each provider
was selected. In the old model, we'd repeat normal discovery when
reloading the lock file and then fail with a confusing error message if
discovery happened to select a different version, but now we'll be able
to distinguish between a package that's gone missing since installation
(which could previously have then selected a different available version)
from a package that has been modified.
2020-04-06 09:24:23 -07:00
..
testdata/cachedir internal/providercache: add windows test fixture 2020-03-25 13:50:00 -07:00
cached_provider.go internal/providercache: Hashing of contents of cached packages 2020-04-06 09:24:23 -07:00
cached_provider_test.go internal/providercache: Hashing of contents of cached packages 2020-04-06 09:24:23 -07:00
dir.go internal/{getproviders,providercache}: improved trace logging 2020-03-25 13:50:00 -07:00
dir_modify.go internal/providercache: Clear the metadata cache during package install 2020-04-06 09:24:23 -07:00
dir_modify_test.go internal/providercache: LinkFromOtherCache removes target, not source 2020-03-25 13:50:00 -07:00
dir_test.go providercache: A package to encapsulate management of provider cache dirs 2020-03-25 11:29:48 -07:00
doc.go providercache: A package to encapsulate management of provider cache dirs 2020-03-25 11:29:48 -07:00
installer.go internal/providercache: Installer records its selections in a file 2020-04-06 09:24:23 -07:00
installer_events.go internal/providercache: Installer records its selections in a file 2020-04-06 09:24:23 -07:00
lock_file.go internal/providercache: Installer records its selections in a file 2020-04-06 09:24:23 -07:00
package_install.go internal/providercache: Installation from HTTP URLs and local archives 2020-03-25 11:29:48 -07:00