state

package
v0.36.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstalledModules

type InstalledModules map[string]string

InstalledModules is a map of normalized source addresses from the manifest to the path of the local directory where the module is installed

func InstalledModulesFromManifest

func InstalledModulesFromManifest(manifest *datadir.ModuleManifest) InstalledModules

func InstalledModulesFromTerraformSources added in v0.36.1

func InstalledModulesFromTerraformSources(path string, sources *datadir.TerraformSources, logger *log.Logger) InstalledModules

type InstalledProviders

type InstalledProviders map[tfaddr.Provider]*version.Version

func (InstalledProviders) Equals

type RootRecord

type RootRecord struct {

	// ProviderSchemaState tracks if we tried loading all provider schemas
	// that this module is using via Terraform CLI
	ProviderSchemaState op.OpState
	ProviderSchemaErr   error

	ModManifest      *datadir.ModuleManifest
	ModManifestErr   error
	ModManifestState op.OpState

	TerraformSources      *datadir.TerraformSources
	TerraformSourcesErr   error
	TerraformSourcesState op.OpState

	// InstalledModules is a map of normalized source addresses from the
	// manifest to the path of the local directory where the module is installed
	InstalledModules InstalledModules

	TerraformVersion      *version.Version
	TerraformVersionErr   error
	TerraformVersionState op.OpState

	InstalledProviders      InstalledProviders
	InstalledProvidersErr   error
	InstalledProvidersState op.OpState
	// contains filtered or unexported fields
}

RootRecord contains all information about a module root path, like anything related to .terraform/ or .terraform.lock.hcl.

func NewRootRecordTest

func NewRootRecordTest(path string) *RootRecord

NewRootRecordTest is a test helper to create a new Module object

func (*RootRecord) Copy

func (m *RootRecord) Copy() *RootRecord

func (*RootRecord) Path

func (m *RootRecord) Path() string

type RootStore

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

func NewRootStore

func NewRootStore(changeStore *globalState.ChangeStore, providerSchemaStore *globalState.ProviderSchemaStore) (*RootStore, error)

func (*RootStore) Add

func (s *RootStore) Add(path string) error

func (*RootStore) AddIfNotExists

func (s *RootStore) AddIfNotExists(path string) error

func (*RootStore) CallersOfModule

func (s *RootStore) CallersOfModule(path string) ([]string, error)

func (*RootStore) Exists

func (s *RootStore) Exists(path string) bool

func (*RootStore) FinishProviderSchemaLoading

func (s *RootStore) FinishProviderSchemaLoading(path string, psErr error) error

func (*RootStore) InstalledModuleCalls

func (s *RootStore) InstalledModuleCalls(path string) (map[string]tfmod.InstalledModuleCall, error)

func (*RootStore) List

func (s *RootStore) List() ([]*RootRecord, error)

func (*RootStore) RecordWithVersion

func (s *RootStore) RecordWithVersion() (*RootRecord, error)

RecordWithVersion returns the first record that has a Terraform version

func (*RootStore) Remove

func (s *RootStore) Remove(path string) error

func (*RootStore) RootRecordByPath

func (s *RootStore) RootRecordByPath(path string) (*RootRecord, error)

func (*RootStore) SetInstalledProvidersState

func (s *RootStore) SetInstalledProvidersState(path string, state op.OpState) error

func (*RootStore) SetLogger

func (s *RootStore) SetLogger(logger *log.Logger)

func (*RootStore) SetModManifestState

func (s *RootStore) SetModManifestState(path string, state op.OpState) error

func (*RootStore) SetProviderSchemaState

func (s *RootStore) SetProviderSchemaState(path string, state op.OpState) error

func (*RootStore) SetTerraformSourcesState added in v0.36.1

func (s *RootStore) SetTerraformSourcesState(path string, state op.OpState) error

func (*RootStore) SetTerraformVersionState

func (s *RootStore) SetTerraformVersionState(path string, state op.OpState) error

func (*RootStore) TerraformSourcesDirectories added in v0.36.1

func (s *RootStore) TerraformSourcesDirectories(path string) []string

func (*RootStore) UpdateInstalledProviders

func (s *RootStore) UpdateInstalledProviders(path string, pvs map[tfaddr.Provider]*version.Version, pvErr error) error

func (*RootStore) UpdateModManifest

func (s *RootStore) UpdateModManifest(path string, manifest *datadir.ModuleManifest, mErr error) error

func (*RootStore) UpdateTerraformAndProviderVersions

func (s *RootStore) UpdateTerraformAndProviderVersions(path string, tfVer *version.Version, pv map[tfaddr.Provider]*version.Version, vErr error) error

func (*RootStore) UpdateTerraformSources added in v0.36.1

func (s *RootStore) UpdateTerraformSources(path string, manifest *datadir.TerraformSources, mErr error) error

Jump to

Keyboard shortcuts

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