Documentation
¶
Overview ¶
Package lockfile parses Terraform/OpenTofu dependency lock files (.terraform.lock.hcl) to extract the exact set of providers and versions a component depends on. The lock file is the authoritative source of resolved provider versions (including transitive providers pulled in by child modules), which makes it the right input for eagerly warming the provider cache across platforms.
Index ¶
Constants ¶
View Source
const Name = ".terraform.lock.hcl"
Name is the conventional filename of the Terraform/OpenTofu dependency lock file. Both tools write the same filename.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// Source is the fully-qualified provider source address recorded as the
// provider block label, e.g. "registry.terraform.io/hashicorp/aws".
Source string
// Version is the exact locked version, e.g. "5.95.0".
Version string
// Constraints is the declaration that selected Version, when Terraform
// recorded one. It is descriptive rather than immutable evidence.
Constraints string
// Hashes contains the checksum entries recorded by Terraform/OpenTofu. The
// zh: entries are archive SHA-256 checksums; h1: entries retain their native
// hash scheme and are intentionally not rewritten as SHA-256 values.
Hashes []string
}
Provider is a single provider dependency recorded in a lock file.
Click to show internal directories.
Click to hide internal directories.