opentofu/internal/depsfile/testdata/locks-files/invalid-versions.hcl
Martin Atkins 264a3cf031 depsfile: Flatten the "hashes" locks to a single set of strings
Although origin registries return specific [filename, hash] pairs, our
various different installation methods can't produce a structured mapping
from platform to hash without breaking changes.

Therefore, as a compromise, we'll continue to do platform-specific checks
against upstream data in the cases where that's possible (installation
from origin registry or network mirror) but we'll treat the lock file as
just a flat set of equally-valid hashes, at least one of which must match
after we've completed whatever checks we've made against the
upstream-provided checksums/signatures.

This includes only the minimal internal/getproviders updates required to
make this compile. A subsequent commit will update that package to
actually support the idea of verifying against multiple hashes.
2020-09-24 14:01:54 -07:00

31 lines
860 B
HCL

provider "terraform.io/test/foo" {
version = "" # ERROR: Invalid provider version number
}
provider "terraform.io/test/bar" {
# The "v" prefix is not expected here
version = "v1.0.0" # ERROR: Invalid provider version number
}
provider "terraform.io/test/baz" {
# Must be written in the canonical form, with three parts
version = "1.0" # ERROR: Invalid provider version number
}
provider "terraform.io/test/boop" {
# Must be written in the canonical form, with three parts
version = "1" # ERROR: Invalid provider version number
}
provider "terraform.io/test/blep" {
# Mustn't use redundant extra zero padding
version = "1.02" # ERROR: Invalid provider version number
}
provider "terraform.io/test/huzzah" { # ERROR: Missing required argument
}
provider "terraform.io/test/huzznot" {
version = null # ERROR: Missing required argument
}