jobs

package
v0.36.4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTerraformVersion

func GetTerraformVersion(ctx context.Context, rootStore *state.RootStore, modPath string) error

GetTerraformVersion obtains "installed" Terraform version which can inform what version of core schema to pick. Knowing the version is not required though as we can rely on the constraint in `required_version` (as parsed via [LoadModuleMetadata] and compare it against known released versions.

func ObtainSchema

func ObtainSchema(ctx context.Context, rootStore *state.RootStore, schemaStore *globalState.ProviderSchemaStore, modPath string) error

ObtainSchema obtains provider schemas via Terraform CLI. This is useful if we do not have the schemas available from the embedded FS (i.e. in [PreloadEmbeddedSchema]).

func ParseModuleManifest

func ParseModuleManifest(ctx context.Context, fs ReadOnlyFS, rootStore *state.RootStore, modPath string) error

ParseModuleManifest parses the "module manifest" which contains records of installed modules, e.g. where they're installed on the filesystem. This is useful for processing any modules which are not local nor hosted in the Registry (which would be handled by [GetModuleDataFromRegistry]).

func ParseProviderVersions

func ParseProviderVersions(ctx context.Context, fs ReadOnlyFS, rootStore *state.RootStore, modPath string) error

ParseProviderVersions is a job complimentary to ObtainSchema in that it obtains versions of providers/schemas from Terraform CLI's lock file.

func ParseTerraformSources added in v0.36.1

func ParseTerraformSources(ctx context.Context, fs ReadOnlyFS, rootStore *state.RootStore, modPath string) error

ParseTerraformSources parses the NEW* "module manifest" which contains records of installed modules, e.g. where they're installed on the filesystem. This is useful for processing any modules which are not local nor hosted in the Registry (which would be handled by [GetModuleDataFromRegistry]). NEW* as there is a new terraform-sources.json file format which currently only exists for stacks.

Types

type ReadOnlyFS

type ReadOnlyFS interface {
	fs.FS
	ReadDir(name string) ([]fs.DirEntry, error)
	ReadFile(name string) ([]byte, error)
	Stat(name string) (fs.FileInfo, error)
}

Jump to

Keyboard shortcuts

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