find

package
v0.77.21 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package find provides the ability to find Terragrunt configurations in your codebase via the `terragrunt find` command.

Index

Constants

View Source
const (
	CommandName  = "find"
	CommandAlias = "fd"

	FormatFlagName = "format"

	JSONFlagName  = "json"
	JSONFlagAlias = "j"

	DAGFlagName = "dag"

	HiddenFlagName = "hidden"
	Dependencies   = "dependencies"
	External       = "external"
	Exclude        = "exclude"

	QueueConstructAsFlagName  = "queue-construct-as"
	QueueConstructAsFlagAlias = "as"
)
View Source
const (
	// FormatText outputs the discovered configurations in text format.
	FormatText = "text"

	// FormatJSON outputs the discovered configurations in JSON format.
	FormatJSON = "json"

	// SortAlpha sorts the discovered configurations in alphabetical order.
	SortAlpha = "alpha"

	// SortDAG sorts the discovered configurations in a topological sort order.
	SortDAG = "dag"

	// ModeNormal is the default mode for the find command.
	ModeNormal = "normal"

	// ModeDAG is the mode for the find command that sorts and groups output in DAG order.
	ModeDAG = "dag"
)

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(opts *options.TerragruntOptions) *cli.Command

func NewFlags

func NewFlags(opts *Options, prefix flags.Prefix) cli.Flags

func Run

func Run(ctx context.Context, opts *Options) error

Run runs the find command.

Types

type Colorizer

type Colorizer struct {
	// contains filtered or unexported fields
}

Colorizer is a colorizer for the discovered configurations.

func NewColorizer

func NewColorizer(shouldColor bool) *Colorizer

NewColorizer creates a new Colorizer.

func (*Colorizer) Colorize

func (c *Colorizer) Colorize(config *FoundConfig) string

type FoundConfig added in v0.75.7

type FoundConfig struct {
	Type discovery.ConfigType `json:"type"`
	Path string               `json:"path"`

	Exclude *config.ExcludeConfig `json:"exclude,omitempty"`

	Dependencies []string `json:"dependencies,omitempty"`
}

type FoundConfigs added in v0.75.7

type FoundConfigs []*FoundConfig

type Options

type Options struct {
	*options.TerragruntOptions

	// Format determines the format of the output.
	Format string

	// Mode determines the mode of the find command.
	Mode string

	// QueueConstructAs constructs the queue as if a particular command was run.
	QueueConstructAs string

	// JSON determines if the output should be in JSON format.
	// Alias for --format=json.
	JSON bool

	// DAG determines if the output should be in DAG mode.
	DAG bool

	// Hidden determines if hidden configurations should be included in the output.
	Hidden bool

	// Dependencies determines if dependencies should be included in the output.
	Dependencies bool

	// Exclude determines if exclude configurations should be included in the output.
	Exclude bool

	// External determines if external dependencies should be included in the output.
	External bool
}

func NewOptions

func NewOptions(opts *options.TerragruntOptions) *Options

func (*Options) Validate

func (o *Options) Validate() error

Jump to

Keyboard shortcuts

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