Documentation
¶
Index ¶
Constants ¶
View Source
const DataDirName = ".terraform"
Variables ¶
This section is empty.
Functions ¶
func ModuleManifestFilePath ¶
func ModuleManifestFilePath(fs filesystem.Filesystem, modulePath string) (string, bool)
func ModulePath ¶
ModulePath strips known lock file paths to get the path to the (closest) module these files belong to
func PluginLockFilePath ¶
func PluginLockFilePath(fs filesystem.Filesystem, modPath string) (string, bool)
Types ¶
type DataDir ¶
func WalkDataDirOfModule ¶
func WalkDataDirOfModule(fs filesystem.Filesystem, modPath string) *DataDir
type ModuleManifest ¶
type ModuleManifest struct {
Records []ModuleRecord `json:"Modules"`
// contains filtered or unexported fields
}
func NewModuleManifest ¶ added in v0.16.0
func NewModuleManifest(rootDir string, records []ModuleRecord) *ModuleManifest
func ParseModuleManifestFromFile ¶
func ParseModuleManifestFromFile(path string) (*ModuleManifest, error)
func (*ModuleManifest) ContainsLocalModule ¶ added in v0.16.0
func (mm *ModuleManifest) ContainsLocalModule(path string) bool
func (*ModuleManifest) Copy ¶ added in v0.17.1
func (mm *ModuleManifest) Copy() *ModuleManifest
func (*ModuleManifest) RootDir ¶
func (mm *ModuleManifest) RootDir() string
type ModuleRecord ¶
type ModuleRecord struct {
// Key is a unique identifier for this particular module, based on its
// position within the static module tree.
Key string `json:"Key"`
// SourceAddr is the source address given for this module in configuration.
// This is used only to detect if the source was changed in configuration
// since the module was last installed, which means that the installer
// must re-install it.
SourceAddr string `json:"Source"`
// Version is the exact version of the module, which results from parsing
// VersionStr. nil for un-versioned modules.
Version *version.Version `json:"-"`
// VersionStr is the version specifier string. This is used only for
// serialization in snapshots and should not be accessed or updated
// by any other codepaths; use "Version" instead.
VersionStr string `json:"Version,omitempty"`
// Dir is the path to the local directory where the module is installed.
Dir string `json:"Dir"`
}
ModuleRecord represents some metadata about an installed module, as part of a ModuleManifest.
func (*ModuleRecord) IsExternal ¶
func (r *ModuleRecord) IsExternal() bool
func (*ModuleRecord) IsRoot ¶
func (r *ModuleRecord) IsRoot() bool
func (*ModuleRecord) UnmarshalJSON ¶
func (r *ModuleRecord) UnmarshalJSON(b []byte) error
type WatchablePaths ¶
func WatchableModulePaths ¶
func WatchableModulePaths(modPath string) *WatchablePaths
Click to show internal directories.
Click to hide internal directories.