Documentation ¶
Index ¶
Constants ¶
View Source
const CMD_ACQUIRE_LOCK = "acquire-lock"
View Source
const CMD_RELEASE_LOCK = "release-lock"
View Source
const CMD_SPIN_UP = "spin-up"
View Source
const CMD_TEAR_DOWN = "tear-down"
View Source
const OPT_NON_INTERACTIVE = "terragrunt-non-interactive"
View Source
const OPT_TERRAGRUNT_CONFIG = "terragrunt-config"
View Source
const OPT_WORKING_DIR = "terragrunt-working-dir"
View Source
const TERRAFORM_EXTENSION_GLOB = "*.tf"
Variables ¶
View Source
var ALL_TERRAGRUNT_BOOLEAN_OPTS = []string{OPT_NON_INTERACTIVE}
View Source
var ALL_TERRAGRUNT_STRING_OPTS = []string{OPT_TERRAGRUNT_CONFIG, OPT_WORKING_DIR}
View Source
var CUSTOM_USAGE_TEXT = fmt.Sprintf(`DESCRIPTION: {{.Name}} - {{.UsageText}} USAGE: {{.Usage}} COMMANDS: apply Acquire a lock and run 'terraform apply' destroy Acquire a lock and run 'terraform destroy' import Acquire a lock and run 'terraform import' refresh Acquire a lock and run 'terraform refresh' remote push Acquire a lock and run 'terraform remote push' %s Acquire a long-term lock for these templates %s Release a long-term lock or a lock that failed to clean up %s Spin up a 'stack' by running 'terragrunt apply' in each subfolder %s Tear down a 'stack' by running 'terragrunt destroy' in each subfolder * Terragrunt forwards all other commands directly to Terraform {{if .VisibleFlags}} GLOBAL OPTIONS: {{range .VisibleFlags}}{{.}} {{end}}{{end}} VERSION: {{.Version}}{{if len .Authors}} AUTHOR(S): {{range .Authors}}{{.}}{{end}} {{end}} `, CMD_ACQUIRE_LOCK, CMD_RELEASE_LOCK, CMD_SPIN_UP, CMD_TEAR_DOWN)
Since Terragrunt is just a thin wrapper for Terraform, and we don't want to repeat every single Terraform command in its definition, we don't quite fit into the model of any Go CLI library. Fortunately, urfave/cli allows us to override the whole template used for the Usage Text.
View Source
var DontManuallyConfigureRemoteState = fmt.Errorf("Instead of manually using the 'remote config' command, define your remote state settings in .terragrunt and Terragrunt will automatically configure it for you (and all your team members) next time you run it.")
View Source
var MODULE_REGEX = regexp.MustCompile(`module ".+"`)
View Source
var MULTI_MODULE_COMMANDS = []string{CMD_SPIN_UP, CMD_TEAR_DOWN}
Functions ¶
func CreateTerragruntCli ¶
Create the Terragrunt CLI App
func ParseTerragruntOptions ¶ added in v0.6.0
func ParseTerragruntOptions(cliContext *cli.Context) (*options.TerragruntOptions, error)
Parse command line options that are passed in for Terragrunt
Types ¶
type ArgMissingValue ¶ added in v0.6.0
type ArgMissingValue string
func (ArgMissingValue) Error ¶ added in v0.6.0
func (err ArgMissingValue) Error() string
type UnrecognizedCommand ¶ added in v0.6.0
type UnrecognizedCommand string
func (UnrecognizedCommand) Error ¶ added in v0.6.0
func (commandName UnrecognizedCommand) Error() string
Click to show internal directories.
Click to hide internal directories.