opentofu/internal/depsfile/testdata/locks-files/invalid-provider-addrs.hcl
Martin Atkins 773dd56b42 internal/depsfile: Introduce the concept of "non-lockable" providers
It doesn't make sense for a built-in provider to appear in a lock file
because built-in providers have no version independent of the version of
Terraform they are compiled into.

We also exclude legacy providers here, because they were supported only
as a transitional aid to enable the Terraform 0.13 upgrade process and
are not intended for explicit selection.

The provider installer will, once it's updated to understand dependency
locking, use this concept to decide which subset of its selections to
record in the dependency lock file for reference for future installation
requests.
2020-09-08 09:50:58 -07:00

45 lines
1.1 KiB
HCL

provider "" { # ERROR: Invalid provider source address
}
provider "hashicorp/aws" { # ERROR: Non-normalized provider source address
}
provider "aws" { # ERROR: Non-normalized provider source address
}
provider "too/many/parts/here" { # ERROR: Invalid provider source address
}
provider "Registry.terraform.io/example/example" { # ERROR: Non-normalized provider source address
}
provider "registry.terraform.io/eXample/example" { # ERROR: Non-normalized provider source address
}
provider "registry.terraform.io/example/Example" { # ERROR: Non-normalized provider source address
}
provider "this/one/okay" {
version = "1.0.0"
}
provider "this/one/okay" { # ERROR: Duplicate provider lock
}
# Legacy providers are not allowed, because they existed only to
# support the Terraform 0.13 upgrade process.
provider "registry.terraform.io/-/null" { # ERROR: Invalid provider source address
}
# Built-in providers are not allowed, because they are not versioned
# independently of the Terraform CLI release they are embedded in.
provider "terraform.io/builtin/foo" { # ERROR: Invalid provider source address
}