Documentation ¶
Overview ¶
Package cli configures the Terragrunt CLI app and its commands.
Index ¶
- Constants
- func DeprecatedCommands(opts *options.TerragruntOptions) cli.Commands
- func ExitErrHandler(_ *cli.Context, err error) error
- func NewDeprecatedFlags(opts *options.TerragruntOptions) cli.Flags
- func OSExiter(exitCode int)
- func TerragruntCommands(opts *options.TerragruntOptions) cli.Commands
- func WrapWithTelemetry(opts *options.TerragruntOptions) func(ctx *cli.Context, action cli.ActionFunc) error
- type App
- type ProviderCache
Constants ¶
const ( CommandNameSpinUp = "spin-up" CommandNameTearDown = "tear-down" CommandNamePlanAll = "plan-all" CommandNameApplyAll = "apply-all" CommandNameDestroyAll = "destroy-all" CommandNameOutputAll = "output-all" CommandNameValidateAll = "validate-all" )
The following commands are DEPRECATED
const ( TerragruntIncludeModulePrefixFlagName = "terragrunt-include-module-prefix" TerragruntIncludeModulePrefixEnvName = "TERRAGRUNT_INCLUDE_MODULE_PREFIX" TerragruntDisableLogFormattingFlagName = "terragrunt-disable-log-formatting" TerragruntDisableLogFormattingEnvName = "TERRAGRUNT_DISABLE_LOG_FORMATTING" TerragruntJSONLogFlagName = "terragrunt-json-log" TerragruntJSONLogEnvName = "TERRAGRUNT_JSON_LOG" TerragruntTfLogJSONFlagName = "terragrunt-tf-logs-to-json" TerragruntTfLogJSONEnvName = "TERRAGRUNT_TF_JSON_LOG" )
The following flags are DEPRECATED
const ( // The status returned when making a request to the caching provider. // It is needed to prevent further loading of providers by terraform, and at the same time make sure that the request was processed successfully. CacheProviderHTTPStatusCode = http.StatusLocked // Authentication type on the Terragrunt Provider Cache server. APIKeyAuth = "x-api-key" )
const AppHelpTemplate = `` /* 832-byte string literal not displayed */
const AppVersionTemplate = `terragrunt version {{.App.Version}}
`
const CommandHelpTemplate = `` /* 975-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func DeprecatedCommands ¶ added in v0.66.7
func DeprecatedCommands(opts *options.TerragruntOptions) cli.Commands
func ExitErrHandler ¶ added in v0.68.0
ExitErrHandler is an empty function that overrides the default behavior.
func NewDeprecatedFlags ¶ added in v0.67.0
func NewDeprecatedFlags(opts *options.TerragruntOptions) cli.Flags
NewDeprecatedFlags creates and returns deprecated flags.
func OSExiter ¶ added in v0.66.7
func OSExiter(exitCode int)
OSExiter is an empty function that overrides the default behavior.
func TerragruntCommands ¶ added in v0.66.7
func TerragruntCommands(opts *options.TerragruntOptions) cli.Commands
TerragruntCommands returns the set of Terragrunt commands.
func WrapWithTelemetry ¶ added in v0.66.7
func WrapWithTelemetry(opts *options.TerragruntOptions) func(ctx *cli.Context, action cli.ActionFunc) error
WrapWithTelemetry wraps CLI command execution with setting of telemetry context and labels, if telemetry is disabled, just runAction the command.
Types ¶
type App ¶ added in v0.56.4
func NewApp ¶ added in v0.48.7
func NewApp(opts *options.TerragruntOptions) *App
NewApp creates the Terragrunt CLI App.
type ProviderCache ¶ added in v0.57.9
func InitProviderCacheServer ¶ added in v0.56.4
func InitProviderCacheServer(opts *options.TerragruntOptions) (*ProviderCache, error)
func (*ProviderCache) TerraformCommandHook ¶ added in v0.57.9
func (cache *ProviderCache) TerraformCommandHook( ctx context.Context, opts *options.TerragruntOptions, args cli.Args, ) (*util.CmdOutput, error)
TerraformCommandHook warms up the providers cache, creates `.terraform.lock.hcl` and runs the `tofu/terraform init` command with using this cache. Used as a hook function that is called after running the target tofu/terraform command. For example, if the target command is `tofu plan`, it will be intercepted before it is run in the `/shell` package, then control will be passed to this function to init the working directory using cached providers.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package commands provides the implementation of the Terragrunt commands.
|
Package commands provides the implementation of the Terragrunt commands. |
aws-provider-patch
Package awsproviderpatch provides the `aws-provider-patch` command.
|
Package awsproviderpatch provides the `aws-provider-patch` command. |
catalog
Package catalog provides the ability to interact with a catalog of OpenTofu/Terraform modules via the `terragrunt catalog` command.
|
Package catalog provides the ability to interact with a catalog of OpenTofu/Terraform modules via the `terragrunt catalog` command. |
catalog/module
Package module provides a struct to represent an OpenTofu/Terraform module.
|
Package module provides a struct to represent an OpenTofu/Terraform module. |
catalog/tui
Package tui provides a text-based user interface for the Terragrunt catalog command.
|
Package tui provides a text-based user interface for the Terragrunt catalog command. |
catalog/tui/command
Package command provides the implementation of the terragrunt scaffold command This command is used to scaffold a new Terragrunt unit in the current directory.
|
Package command provides the implementation of the terragrunt scaffold command This command is used to scaffold a new Terragrunt unit in the current directory. |
catalog/tui/components/buttonbar
Package buttonbar provides a bubbletea component that displays an inline list of buttons.
|
Package buttonbar provides a bubbletea component that displays an inline list of buttons. |
graph
Package graph provides the `graph` command for Terragrunt.
|
Package graph provides the `graph` command for Terragrunt. |
graph-dependencies
Package graphdependencies provides the command to print the terragrunt dependency graph to stdout.
|
Package graphdependencies provides the command to print the terragrunt dependency graph to stdout. |
hclfmt
Package hclfmt provides the hclfmt command for formatting HCL files.
|
Package hclfmt provides the hclfmt command for formatting HCL files. |
hclvalidate
Package hclvalidate provides the `hclvalidate` command for Terragrunt.
|
Package hclvalidate provides the `hclvalidate` command for Terragrunt. |
output-module-groups
Package outputmodulegroups provides a command to output groups of modules ordered by command (apply or destroy) as a list of list in JSON (useful for CI use cases).
|
Package outputmodulegroups provides a command to output groups of modules ordered by command (apply or destroy) as a list of list in JSON (useful for CI use cases). |
render-json
Package renderjson provides the command to render the final terragrunt config, with all variables, includes, and functions resolved, as json.
|
Package renderjson provides the command to render the final terragrunt config, with all variables, includes, and functions resolved, as json. |
run-all
Package runall provides the `run-all` command that runs a terraform command against a 'stack' by running the specified command in each subfolder.
|
Package runall provides the `run-all` command that runs a terraform command against a 'stack' by running the specified command in each subfolder. |
scaffold
Package scaffold provides the command to scaffold a new Terragrunt module.
|
Package scaffold provides the command to scaffold a new Terragrunt module. |
terraform
Package terraform contains the logic for interacting with OpenTofu/Terraform.
|
Package terraform contains the logic for interacting with OpenTofu/Terraform. |
terraform/creds
Package creds provides a way to obtain credentials through different providers and set them to `opts.Env`.
|
Package creds provides a way to obtain credentials through different providers and set them to `opts.Env`. |
terraform/creds/providers
Package providers defines the interface for a provider.
|
Package providers defines the interface for a provider. |
terraform/creds/providers/amazonsts
Package amazonsts provides a credentials provider that obtains credentials by making API requests to Amazon STS.
|
Package amazonsts provides a credentials provider that obtains credentials by making API requests to Amazon STS. |
terraform/creds/providers/externalcmd
Package externalcmd provides a provider that runs an external command that returns a json string with credentials.
|
Package externalcmd provides a provider that runs an external command that returns a json string with credentials. |
terragrunt-info
Package terragruntinfo provides the command to emit limited terragrunt state on stdout and exits.
|
Package terragruntinfo provides the command to emit limited terragrunt state on stdout and exits. |
validate-inputs
Package validateinputs provides the command to validate the inputs of a Terragrunt configuration file against the variables defined in OpenTofu/Terraform configuration files.
|
Package validateinputs provides the command to validate the inputs of a Terragrunt configuration file against the variables defined in OpenTofu/Terraform configuration files. |