Documentation
¶
Index ¶
Constants ¶
const DefaultProviderRegistryHostname = "registry.terraform.io"
Variables ¶
This section is empty.
Functions ¶
func IsRegistryModuleSource ¶
IsRegistryModuleSource returns true if the source looks like a Terraform registry module reference.
func ParseProviderSource ¶
ParseProviderSource parses a provider source like "hashicorp/aws".
Types ¶
type ModuleAddress ¶
type ModuleAddress struct {
Hostname string
Namespace string
Name string
Provider string
Subdir string
}
ModuleAddress is a normalized registry module source address.
func ParseRegistryModuleSource ¶
func ParseRegistryModuleSource(source string) (ModuleAddress, error)
ParseRegistryModuleSource parses a registry module source like "hashicorp/consul/aws" or "app.terraform.io/hashicorp/consul/aws".
func (ModuleAddress) Source ¶
func (a ModuleAddress) Source() string
func (ModuleAddress) WithHostname ¶
func (a ModuleAddress) WithHostname(host string) ModuleAddress
WithHostname returns a copy of the module address using the provided hostname when non-empty.
type ProviderAddress ¶
ProviderAddress is a normalized provider source address.
func ParseProviderAddress ¶
func ParseProviderAddress(source string) (ProviderAddress, error)
ParseProviderAddress parses a short or fully-qualified provider source.
func (ProviderAddress) ShortSource ¶
func (a ProviderAddress) ShortSource() string
func (ProviderAddress) Source ¶
func (a ProviderAddress) Source() string
Source returns the fully-qualified source form.
func (ProviderAddress) WithHostname ¶
func (a ProviderAddress) WithHostname(host string) ProviderAddress
WithHostname returns a copy of the provider address using the provided hostname when non-empty.