Documentation
¶
Overview ¶
Package stack provides the command to stack.
Index ¶
- Constants
- func FilterOutputs(outputs cty.Value, index string) cty.Value
- func NewCommand(l log.Logger, opts *options.TerragruntOptions) *cli.Command
- func PrintJSONOutput(writer io.Writer, outputs cty.Value) error
- func PrintOutputs(writer io.Writer, outputs cty.Value) error
- func PrintRawOutputs(_ *options.TerragruntOptions, writer io.Writer, outputs cty.Value) error
- func Run(ctx context.Context, l log.Logger, opts *options.TerragruntOptions) error
- func RunClean(ctx context.Context, l log.Logger, opts *options.TerragruntOptions) error
- func RunGenerate(ctx context.Context, l log.Logger, opts *options.TerragruntOptions) error
- func RunOutput(ctx context.Context, l log.Logger, opts *options.TerragruntOptions, ...) error
Constants ¶
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 ¶ added in v0.72.9
FilterOutputs filters the outputs based on the provided index key.
func NewCommand ¶
NewCommand builds the command for stack.
func PrintJSONOutput ¶ added in v0.72.9
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 ¶ added in v0.72.9
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 ¶ added in v0.72.9
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 RunClean ¶ added in v0.73.1
RunClean recursively removes all stack directories under the specified WorkingDir.
func RunGenerate ¶
RunGenerate runs the stack command.
Types ¶
This section is empty.