stack

package
v0.99.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package stack provides the command to stack.

Index

Constants

View Source
const (
	// CommandName stack command name.
	CommandName          = "stack"
	OutputFormatFlagName = "format"
	JSONFormatFlagName   = "json"
	RawFormatFlagName    = "raw"
	NoStackValidate      = "no-stack-validate"
)

Variables

This section is empty.

Functions

func FilterOutputs

func FilterOutputs(outputs cty.Value, index string) cty.Value

FilterOutputs filters the outputs based on the provided index key.

func NewCommand

func NewCommand(l log.Logger, opts *options.TerragruntOptions) *clihelper.Command

NewCommand builds the command for stack.

func PrintJSONOutput

func PrintJSONOutput(writer io.Writer, outputs cty.Value) error

PrintJSONOutput formats outputs as pretty-printed JSON with 2-space indentation. It marshals the cty.Value data to JSON using the go-cty library and writes the formatted result to the provided writer.

func PrintOutputs

func PrintOutputs(writer io.Writer, outputs cty.Value) error

PrintOutputs formats outputs as HCL and writes them to the provided writer. It creates a new HCL file with each top-level output as an attribute, preserving the original structure of complex types like maps and objects.

func PrintRawOutputs

func PrintRawOutputs(_ *options.TerragruntOptions, writer io.Writer, outputs cty.Value) error

PrintRawOutputs formats outputs for raw output format, similar to Tofu's output -raw. When the output is a raw output for a specific path, it will extract the raw value without quotes or formatting and write it directly to the provided writer. It only supports primitive values (strings, numbers, and booleans) and will return an error for complex types.

func Run

Run execute stack command.

func RunClean

func RunClean(ctx context.Context, l log.Logger, opts *options.TerragruntOptions) error

RunClean recursively removes all stack directories under the specified WorkingDir.

func RunGenerate

func RunGenerate(ctx context.Context, l log.Logger, opts *options.TerragruntOptions) error

RunGenerate runs the stack command.

func RunOutput

func RunOutput(ctx context.Context, l log.Logger, opts *options.TerragruntOptions, index string) error

RunOutput stack output.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL