run

package
v0.93.13 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package run contains the CLI command definition for interacting with OpenTofu/Terraform.

Package run provides Terragrunt command flags.

Index

Constants

View Source
const (
	NoAutoInitFlagName                     = "no-auto-init"
	NoAutoRetryFlagName                    = "no-auto-retry"
	NoAutoApproveFlagName                  = "no-auto-approve"
	NoAutoProviderCacheDirFlagName         = "no-auto-provider-cache-dir"
	TFForwardStdoutFlagName                = "tf-forward-stdout"
	UnitsThatIncludeFlagName               = "units-that-include"
	DependencyFetchOutputFromStateFlagName = "dependency-fetch-output-from-state"
	UsePartialParseConfigCacheFlagName     = "use-partial-parse-config-cache"
	SummaryPerUnitFlagName                 = "summary-per-unit"
	VersionManagerFileNameFlagName         = "version-manager-file-name"

	DisableCommandValidationFlagName   = "disable-command-validation"
	NoDestroyDependenciesCheckFlagName = "no-destroy-dependencies-check"

	SourceFlagName       = "source"
	SourceMapFlagName    = "source-map"
	SourceUpdateFlagName = "source-update"

	NoStackGenerate = "no-stack-generate"

	ProviderCacheFlagName              = "provider-cache"
	ProviderCacheDirFlagName           = "provider-cache-dir"
	ProviderCacheHostnameFlagName      = "provider-cache-hostname"
	ProviderCachePortFlagName          = "provider-cache-port"
	ProviderCacheTokenFlagName         = "provider-cache-token"
	ProviderCacheRegistryNamesFlagName = "provider-cache-registry-names"

	EngineEnableFlagName    = "experimental-engine"
	EngineCachePathFlagName = "engine-cache-path"
	EngineSkipCheckFlagName = "engine-skip-check"
	EngineLogLevelFlagName  = "engine-log-level"

	SummaryDisableFlagName = "summary-disable"
	ReportFileFlagName     = "report-file"
	ReportFormatFlagName   = "report-format"
	ReportSchemaFlagName   = "report-schema-file"

	OutDirFlagName     = "out-dir"
	JSONOutDirFlagName = "json-out-dir"

	// `--graph` related flags.
	GraphRootFlagName = "graph-root"

	FailFastFlagName = "fail-fast"

	// Backend and feature flags (shared with backend commands) - use shared package constants
	BackendBootstrapFlagName        = shared.BackendBootstrapFlagName
	BackendRequireBootstrapFlagName = shared.BackendRequireBootstrapFlagName
	DisableBucketUpdateFlagName     = shared.DisableBucketUpdateFlagName
	FeatureFlagName                 = shared.FeatureFlagName

	// Config and download flags - use shared package constants
	ConfigFlagName      = shared.ConfigFlagName
	DownloadDirFlagName = shared.DownloadDirFlagName

	// Auth and IAM flags - use shared package constants
	AuthProviderCmdFlagName               = shared.AuthProviderCmdFlagName
	InputsDebugFlagName                   = shared.InputsDebugFlagName
	IAMAssumeRoleFlagName                 = shared.IAMAssumeRoleFlagName
	IAMAssumeRoleDurationFlagName         = shared.IAMAssumeRoleDurationFlagName
	IAMAssumeRoleSessionNameFlagName      = shared.IAMAssumeRoleSessionNameFlagName
	IAMAssumeRoleWebIdentityTokenFlagName = shared.IAMAssumeRoleWebIdentityTokenFlagName
)
View Source
const (
	CommandName = "run"
)
View Source
const TFCommandHelpTemplate = `Usage: {{ if .Command.UsageText }}{{ wrap .Command.UsageText 3 }}{{ else }}{{ range $parent := parentCommands . }}{{ $parent.HelpName }} {{ end }}[global options] {{ .Command.HelpName }} [options]{{ if eq .Command.Name "` + tf.CommandNameApply + `" }} [PLAN]{{ end }}{{ end }}{{ $description := .Command.Usage }}{{ if .Command.Description }}{{ $description = .Command.Description }}{{ end }}{{ if $description }}

   {{ wrap $description 3 }}{{ end }}{{ if ne .Parent.Command.Name "` + CommandName + `" }}

   This is a shortcut for the command ` + "`terragrunt " + CommandName + "`" + `.{{ end }}

   It wraps the ` + "`{{ tfCommand }}`" + ` command of the binary defined by ` + "`tf-path`" + `.

{{ if isTerraformPath }}Terraform{{ else }}OpenTofu{{ end }} ` + "`{{ tfCommand }}`" + ` help:{{ $tfHelp := runTFHelp }}{{ if $tfHelp }}

{{ $tfHelp }}{{ end }}
`

TFCommandHelpTemplate is the TF command CLI help template.

Variables

This section is empty.

Functions

func Action

func NewCommand

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

func NewFlags

func NewFlags(l log.Logger, opts *options.TerragruntOptions, prefix flags.Prefix) cli.Flags

NewFlags creates and returns global flags.

func NewSubcommands

func NewSubcommands(l log.Logger, opts *options.TerragruntOptions) cli.Commands

func ShowTFHelp

func ShowTFHelp(l log.Logger, opts *options.TerragruntOptions) cli.HelpFunc

ShowTFHelp prints TF help for the given `ctx.Command` command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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