Documentation ¶
Overview ¶
This is a bastardised version of the internal depsfile and addr packages from the terraform source code i.e. "github.com/hashicorp/terraform/internal/addrs" and "github.com/hashicorp/terraform/internal/depsfile". We simply need to load the .terraform.lock.hcl file and decode the version and version constraint for each provider. So this lockfile package contains only the essential functions etc. from the two internal modules listed above. Yes, this is not nice but it works.
Index ¶
Constants ¶
View Source
const DefaultProviderRegistryHost = svchost.Hostname("registry.terraform.io")
View Source
const LegacyProviderNamespace = "-"
View Source
const UnknownProviderNamespace = "?"
Variables ¶
View Source
var ErrParseProviderPart = errors.New("error parsing provider parts")
Functions ¶
func ParseProviderPart ¶
Types ¶
type Locks ¶
type Locks struct { Providers map[Provider]*ProviderLock OverriddenProviders map[Provider]struct{} Sources map[string][]byte }
type ParserError ¶
func (*ParserError) Error ¶
func (pe *ParserError) Error() string
type Provider ¶
func ParseProviderSource ¶
type ProviderLock ¶
type ProviderLock struct { // addr is the address of the provider this lock applies to. Addr Provider Version Version VersionConstraints VersionConstraints }
type Version ¶
func ParseVersion ¶
type VersionConstraints ¶
type VersionConstraints = constraints.IntersectionSpec
func ParseVersionConstraints ¶
func ParseVersionConstraints(str string) (VersionConstraints, error)
Click to show internal directories.
Click to hide internal directories.