resolver

package
v1.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

  • Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. *

  • This product includes software developed at Datadog (https://www.datadoghq.com) Copyright 2024 Datadog, Inc.

  • Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. *

  • This product includes software developed at Datadog (https://www.datadoghq.com) Copyright 2024 Datadog, Inc.

  • Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. *

  • This product includes software developed at Datadog (https://www.datadoghq.com) Copyright 2024 Datadog, Inc.

  • Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. *

  • This product includes software developed at Datadog (https://www.datadoghq.com) Copyright 2024 Datadog, Inc.

  • Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. *

  • This product includes software developed at Datadog (https://www.datadoghq.com) Copyright 2024 Datadog, Inc.

Package resolver implements Terraform module resolution for tfmodules.RemoteResolver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModuleCache

func NewModuleCache() (*moduleCache, error)

NewModuleCache creates ~/.cache/.../modules (or XDG_CACHE_HOME) and returns it.

Types

type ChainResolver

type ChainResolver struct {
	// contains filtered or unexported fields
}

ChainResolver tries each Resolver in order.

func NewChainResolver

func NewChainResolver(resolvers ...Resolver) *ChainResolver

func (*ChainResolver) Resolve

type DotTerraformResolver

type DotTerraformResolver struct {
	RootDirs []string
	// contains filtered or unexported fields
}

DotTerraformResolver reads terraform init output: .terraform/modules/modules.json.

func (*DotTerraformResolver) Resolve

type LocalResolver

type LocalResolver struct{}

LocalResolver resolves local filesystem module sources.

func (LocalResolver) Resolve

type Manifest

type Manifest struct {
	Dir     string                   `json:"dir"`
	Modules map[string]ManifestEntry `json:"modules"`
}

Manifest is validated JSON: optional root Dir plus source or source@version → ManifestEntry.

func LoadManifest

func LoadManifest(path string) (*Manifest, error)

LoadManifest parses and validates manifest JSON from path.

type ManifestEntry

type ManifestEntry struct {
	LocalPath string `json:"local_path"`
	Version   string `json:"version,omitempty"`
	Origin    string `json:"origin,omitempty"`
}

ManifestEntry is one row in a --modules-manifest JSON file.

type PrefetchedResolver

type PrefetchedResolver struct {
	// contains filtered or unexported fields
}

PrefetchedResolver resolves modules from a --modules-manifest.

func NewPrefetchedResolver

func NewPrefetchedResolver(m *Manifest) *PrefetchedResolver

func (*PrefetchedResolver) Resolve

type Resolution

type Resolution struct {
	LocalPath string
	Cleanup   func() // optional post-scan cleanup
}

Resolution holds a resolved module directory and optional cleanup.

type Resolver

type Resolver interface {
	Resolve(ctx context.Context, mod *tfmodules.ParsedModule) (Resolution, error)
}

Resolver maps one module call to disk; errors should wrap *tfmodules.UnresolvedError when appropriate.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL