Documentation
¶
Index ¶
Constants ¶
const ( FieldNameTfPath = "terraform_path" FieldNameTfBinary = "terraform_binary" FieldNameTfBinarySHA256 = "terraform_binary_sha256" StorageKeyConfiguration = "terraform_configuration" )
const (
// StorageKeyTerraformState is the key for storing terraform state in storage
StorageKeyTerraformState = "terraform_state"
)
Variables ¶
This section is empty.
Functions ¶
func ApplyTerraformFromFS ¶ added in v0.2.0
ApplyTerraformFromFS extracts terraform files from the given filesystem and applies them using Terraform CLI.
Directory layout inside tmpDir:
tmpDir/ ├── workspace/ ← .tf files extracted here (CWD for terraform) └── .rootfs/ ← sandbox skeleton (only in sandboxed mode)
Files under config.TfPath are extracted directly into workspace/ without the prefix, so terraform always runs from workspace/. The .rootfs sibling is derived from workDir by newSandboxedCommand and never appears inside /workspace after pivot_root.
func ResolveAndValidateTfBinary ¶ added in v0.1.4
ResolveAndValidateTfBinary resolves the terraform binary path, validates that it exists, is a regular file with execute permission, and optionally matches the expected SHA256. Empty tfBinary is treated as "terraform". Returns the absolute path to the binary or an error.
Types ¶
type CLIConfig ¶
type CLIConfig struct {
VaultAddr string
VaultToken string
VaultNamespace string
VaultCACertBytes string
TfPath string
TfBinary string
TfBinarySHA256 string
Storage logical.Storage
Logger hclog.Logger
}
CLIConfig contains configuration for terraform CLI execution