Documentation
¶
Index ¶
- func New(v *validator.Validate, opts ...runOption) (*run, error)
- func WithLogger(l hclog.Logger) runOption
- func WithOutputSettings(settings *OutputSettings) runOption
- func WithPrePlanHook(h PrePlanHook) runOption
- func WithWorkspace(w workspace.Workspace) runOption
- type OutputSettings
- type PrePlanHook
- type Run
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithLogger ¶
func WithOutputSettings ¶
func WithOutputSettings(settings *OutputSettings) runOption
func WithPrePlanHook ¶ added in v0.19.894
func WithPrePlanHook(h PrePlanHook) runOption
WithPrePlanHook registers a callback that runs after init and before plan. Intended for deterministic state migrations (e.g. `terraform state mv`) that must happen before the planner evaluates `for_each` keys.
func WithWorkspace ¶
Types ¶
type OutputSettings ¶
type PrePlanHook ¶ added in v0.19.894
PrePlanHook runs after `terraform init` and before `terraform plan`. Use it to mutate state (e.g. `terraform state mv`) in a controlled way before the planner evaluates `for_each` keys.
type Run ¶
type Run interface {
Apply(context.Context) error
ApplyPlan(context.Context) error
Validate(context.Context) error
Plan(context.Context) error
Destroy(context.Context) error
DestroyPlan(context.Context) error
}
Run accepts a workspace, and executes the provided command in it, uploading outputs to the correct place, afterwards.
Click to show internal directories.
Click to hide internal directories.