Documentation
¶
Overview ¶
Package plugin centralizes Terraform provider plugin-cache policy shared by the normal Terraform command pipeline and internal output lookups.
Index ¶
Constants ¶
const ( // CacheDirEnv is Terraform's provider plugin-cache environment variable. CacheDirEnv = "TF_PLUGIN_CACHE_DIR" // CacheMayBreakLockFileEnv allows Terraform to reuse an Atmos-managed cache // before a fully portable dependency lock entry exists. CacheMayBreakLockFileEnv = "TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE" )
Variables ¶
This section is empty.
Functions ¶
func IsValidDirectory ¶
IsValidDirectory reports whether path is a safe, absolute provider-cache directory. Relative paths are rejected because they would resolve against whichever working directory happens to be current, producing a different effective cache location per component instead of one shared cache.
Types ¶
type Cache ¶
Cache describes the effective provider plugin cache for one Terraform subprocess. Environment is populated only when Atmos selected the cache automatically; callers retain complete control over an explicit TF_PLUGIN_CACHE_DIR override.
func Resolve ¶
func Resolve(atmosConfig *schema.AtmosConfiguration, override string, overrideSet bool) Cache
Resolve applies Atmos's provider-cache policy. An explicit cache directory takes precedence over the configured default. Empty and root-directory overrides are rejected to preserve the existing Atmos safety behavior.
func (Cache) InitLockPath ¶
InitLockPath returns a stable, machine-local lock path for serializing Terraform init calls that share this cache. Relative cache directories are resolved from the current process directory.
func (Cache) InitLockPathForWorkdir ¶
InitLockPathForWorkdir returns a stable, machine-local lock path for a Terraform working directory. It intentionally lives outside the cache and working directories so it never becomes provider-cache data or a repository artifact.