Versions in this module Expand all Collapse all v1 v1.0.1 Apr 27, 2026 v1.0.0 Apr 27, 2026 Changes in this version + func HasOpenTofuExtension(name string) bool + func HasTerraformExtension(name string) bool + func IsGitSSHSource(u *url.URL) bool + func IsLocalModule(source string) bool + func NormalizeGitURLToHTTPS(u *url.URL) (*url.URL, error) + func RecursivelyAddDirsToSparseCheckout(repoRoot string, sourceURL string, packageFetcher *PackageFetcher, ...) error + func ResetGlobalModuleCache() + func ResolveSymLinkedDirs(repoRoot, dir string) ([]string, error) + type BaseCredentialSet struct + Host string + Token string + type Cache struct + func NewCache(disco *Disco, logger zerolog.Logger) *Cache + type ConditionalTransport struct + Inner http.RoundTripper + ProxyHosts []string + ProxyURL string + func (t *ConditionalTransport) RoundTrip(req *http.Request) (*http.Response, error) + type CredentialsSource struct + BaseCredentialSet BaseCredentialSet + FetchToken FetchTokenFunc + func NewTerraformCredentialsSource(creds BaseCredentialSet) (*CredentialsSource, error) + func (s *CredentialsSource) ForHost(host svchost.Hostname) (auth.HostCredentials, error) + func (s *CredentialsSource) ForgetForHost(host svchost.Hostname) error + func (s *CredentialsSource) StoreForHost(host svchost.Hostname, credentials auth.HostCredentialsWritable) error + type CustomGitGetter struct + func (g *CustomGitGetter) Get(ctx context.Context, dst string, u *url.URL) error + type Disco struct + func NewDisco(credentialsSource auth.CredentialsSource, logger zerolog.Logger) *Disco + func (d *Disco) DownloadLocation(moduleURL RegistryURL, version string) (string, error) + func (d *Disco) ModuleLocation(source string) (RegistryURL, bool, error) + type FetchTokenFunc func(key string) string + type HostCredentials struct + func (c HostCredentials) PrepareRequest(req *http.Request) + func (c HostCredentials) Token() string + type HttpPublicModuleChecker struct + func NewHttpPublicModuleChecker() *HttpPublicModuleChecker + func (h *HttpPublicModuleChecker) IsPublicModule(moduleAddr string) (bool, error) + type Manifest struct + Modules []*ManifestModule + Path string + Version string + func (m Manifest) Get(key string) ManifestModule + type ManifestModule struct + Dir string + DownloadURL string + IsSourceMapped bool + Key string + Source string + Version string + func (m ManifestModule) URL() string + type ModuleLoader struct + func NewModuleLoader(opts ModuleLoaderOptions) *ModuleLoader + func (m *ModuleLoader) Load(path string) (man *Manifest, err error) + func (m *ModuleLoader) MapSourceWithRegex(source string) (SourceMapResult, error) + type ModuleLoaderOptions struct + CachePath string + CredentialsSource *CredentialsSource + HCLParser *SharedHCLParser + Logger zerolog.Logger + ModuleSync *intSync.KeyMutex + PublicModuleChecker PublicModuleChecker + RemoteCache RemoteCache + SourceMap settings.TerraformSourceMap + SourceMapRegex settings.TerraformSourceMapRegex + type PackageFetcher struct + func NewPackageFetcher(remoteCache RemoteCache, logger zerolog.Logger, opts ...PackageFetcherOpts) *PackageFetcher + func (p *PackageFetcher) Fetch(moduleAddr string, dest string) error + type PackageFetcherOpts func(*PackageFetcher) + func WithGetters(getters map[string]getter.Getter) PackageFetcherOpts + func WithPublicModuleChecker(publicModuleChecker PublicModuleChecker) PackageFetcherOpts + type PublicModuleChecker interface + IsPublicModule func(moduleAddr string) (bool, error) + type RegistryLoader struct + func NewRegistryLoader(packageFetcher *PackageFetcher, disco *Disco, logger zerolog.Logger) *RegistryLoader + func (r *RegistryLoader) DownloadLocation(moduleURL RegistryURL, version string) (string, error) + type RegistryLookupResult struct + ModuleURL RegistryURL + OK bool + Version string + type RegistryURL struct + Credentials auth.HostCredentials + Host string + Location string + RawSource string + type RemoteCache interface + Exists func(key string, public bool) (bool, error) + Get func(key string, dest string, public bool) error + Put func(key string, src string, ttl time.Duration, public bool) error + type S3Cache struct + func NewS3Cache(region, bucketName, prefix string, cachePrivate bool) (*S3Cache, error) + func (cache *S3Cache) Exists(key string, public bool) (bool, error) + func (cache *S3Cache) Get(key, destPath string, public bool) error + func (cache *S3Cache) Put(key, srcPath string, ttl time.Duration, public bool) error + type SharedHCLParser struct + func NewSharedHCLParser() *SharedHCLParser + func (p *SharedHCLParser) ParseHCLFile(filename string) (*hcl.File, hcl.Diagnostics) + func (p *SharedHCLParser) ParseJSONFile(filename string) (*hcl.File, hcl.Diagnostics) + type SourceMapResult struct + RawQuery string + Source string + Version string + func MapSource(sourceMap settings.TerraformSourceMap, source string) (SourceMapResult, error)