Documentation
¶
Index ¶
- func BuildTerraformGraph(stacks map[string]any) (*dependency.Graph, error)
- func ExecuteTerraform(ctx context.Context, opts TerraformOptions) error
- func FilterTerraformGraph(atmosConfig *schema.AtmosConfiguration, graph *dependency.Graph, ...) (*dependency.Graph, error)
- type TerraformDispatcher
- type TerraformExecution
- type TerraformExecutionResult
- type TerraformExecutor
- type TerraformNodeOutcome
- type TerraformOptions
- type TerraformSelection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTerraformGraph ¶
func BuildTerraformGraph(stacks map[string]any) (*dependency.Graph, error)
BuildTerraformGraph builds a Terraform component graph from described stacks.
func ExecuteTerraform ¶
func ExecuteTerraform(ctx context.Context, opts TerraformOptions) error
ExecuteTerraform runs selected Terraform components through the shared scheduler.
func FilterTerraformGraph ¶
func FilterTerraformGraph(atmosConfig *schema.AtmosConfiguration, graph *dependency.Graph, info *schema.ConfigAndStacksInfo, selection *TerraformSelection) (*dependency.Graph, error)
FilterTerraformGraph narrows graph nodes to the user-selected bulk operation set.
Types ¶
type TerraformDispatcher ¶
type TerraformDispatcher struct {
// contains filtered or unexported fields
}
TerraformDispatcher adapts scheduler nodes to Terraform component execution.
func (*TerraformDispatcher) Dispatch ¶
func (d *TerraformDispatcher) Dispatch(ctx context.Context, node *dependency.Node) (scheduler.Result, error)
Dispatch executes one Terraform scheduler node.
type TerraformExecution ¶
type TerraformExecution struct {
Context context.Context
Info schema.ConfigAndStacksInfo
Stdout io.Writer
Stderr io.Writer
CaptureOutput bool
Flush func() error
}
TerraformExecution contains the execution context for one Terraform component.
type TerraformExecutionResult ¶
TerraformExecutionResult contains captured output for one Terraform component.
func (TerraformExecutionResult) CombinedOutput ¶
func (r TerraformExecutionResult) CombinedOutput() string
CombinedOutput returns stdout and stderr in the order hooks expect.
type TerraformExecutor ¶
type TerraformExecutor func(TerraformExecution) (TerraformExecutionResult, error)
TerraformExecutor executes one resolved Terraform component instance.
type TerraformNodeOutcome ¶
type TerraformNodeOutcome struct {
Processed bool `json:"processed"`
Changed bool `json:"changed"`
ExitCode int `json:"exit_code"`
LogFiles map[string]string `json:"log_files,omitempty"`
}
TerraformNodeOutcome records the scheduler-visible result for one Terraform node.
type TerraformOptions ¶
type TerraformOptions struct {
AtmosConfig *schema.AtmosConfiguration
Info *schema.ConfigAndStacksInfo
Stacks map[string]any
Executor TerraformExecutor
Selection *TerraformSelection
}
TerraformOptions configures graph-backed Terraform bulk execution.
type TerraformSelection ¶
TerraformSelection narrows the scheduler graph to a precomputed set of Terraform nodes, optionally including graph closure around those nodes.