Documentation ¶
Index ¶
- func GetTerraformVersion(ctx context.Context, rootStore *state.RootStore, modPath string) error
- func ObtainSchema(ctx context.Context, rootStore *state.RootStore, ...) error
- func ParseModuleManifest(ctx context.Context, fs ReadOnlyFS, rootStore *state.RootStore, modPath string) error
- func ParseProviderVersions(ctx context.Context, fs ReadOnlyFS, rootStore *state.RootStore, modPath string) error
- func ParseTerraformSources(ctx context.Context, fs ReadOnlyFS, rootStore *state.RootStore, modPath string) error
- type ReadOnlyFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTerraformVersion ¶
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.