terraform/internal/depsfile
Alisdair McDiarmid 9576a5b2d8 internal: Fix lockfile constraint output for 1.2.*
If a configuration requires a partial provider version (with some parts
unspecified), Terraform considers this as a constrained-to-zero version.
For example, a version constraint of 1.2 will result in an attempt to
install version 1.2.0, even if 1.2.1 is available.

When writing the dependency locks file, we previously would write 1.2.*,
as this is the in-memory representation of 1.2. This would then cause an
error on re-reading the locks file, as this is not a valid constraint
format.

Instead, we now explicitly convert the constraint to its zero-filled
representation before writing the locks file. This ensures that it
correctly round-trips.

Because this change is made in getproviders.VersionConstraintsString, it
also affects the output of the providers sub-command.
2020-10-20 10:14:03 -04:00
..
testdata/locks-files depsfile: Flatten the "hashes" locks to a single set of strings 2020-09-24 14:01:54 -07:00
doc.go internal/depsfile: Loading locks from HCL files on disk 2020-09-08 09:50:58 -07:00
locks.go command/init: Read, respect, and update provider dependency locks 2020-10-09 09:26:23 -07:00
locks_file.go internal/depsfile: Update the dependency lock file atomically 2020-10-14 08:01:19 -07:00
locks_file_test.go internal: Fix lockfile constraint output for 1.2.* 2020-10-20 10:14:03 -04:00
locks_test.go depsfile: Locks.Equal and Locks.Empty methods 2020-10-09 09:26:23 -07:00
paths.go internal/depsfile: Loading locks from HCL files on disk 2020-09-08 09:50:58 -07:00
testing.go command/init: Read, respect, and update provider dependency locks 2020-10-09 09:26:23 -07:00