cli

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2018 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const CMD_APPLY_ALL = "apply-all"
View Source
const CMD_DESTROY_ALL = "destroy-all"
View Source
const CMD_INIT = "init"
View Source
const CMD_OUTPUT_ALL = "output-all"
View Source
const CMD_PLAN_ALL = "plan-all"
View Source
const CMD_SPIN_UP = "spin-up"

CMD_SPIN_UP is deprecated.

View Source
const CMD_TEAR_DOWN = "tear-down"

CMD_TEAR_DOWN is deprecated.

View Source
const CMD_VALIDATE_ALL = "validate-all"
View Source
const DEFAULT_TERRAFORM_VERSION_CONSTRAINT = ">= v0.9.3"

This uses the constraint syntax from https://github.com/hashicorp/go-version

View Source
const OPT_NON_INTERACTIVE = "terragrunt-non-interactive"
View Source
const OPT_TERRAGRUNT_CONFIG = "terragrunt-config"
View Source
const OPT_TERRAGRUNT_IAM_ROLE = "terragrunt-iam-role"
View Source
const OPT_TERRAGRUNT_IGNORE_DEPENDENCY_ERRORS = "terragrunt-ignore-dependency-errors"
View Source
const OPT_TERRAGRUNT_NO_AUTO_INIT = "terragrunt-no-auto-init"
View Source
const OPT_TERRAGRUNT_SOURCE = "terragrunt-source"
View Source
const OPT_TERRAGRUNT_SOURCE_UPDATE = "terragrunt-source-update"
View Source
const OPT_TERRAGRUNT_TFPATH = "terragrunt-tfpath"
View Source
const OPT_WORKING_DIR = "terragrunt-working-dir"
View Source
const TERRAFORM_EXTENSION_GLOB = "*.tf"

Variables

View Source
var CUSTOM_USAGE_TEXT = `` /* 1913-byte string literal not displayed */

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.

TODO: this description text has copy/pasted versions of many Terragrunt constants, such as command names and file names. It would be easy to make this code DRY using fmt.Sprintf(), but then it's hard to make the text align nicely. Write some code to take generate this help text automatically, possibly leveraging code that's part of urfave/cli.

DEPRECATED_COMMANDS is a map of deprecated commands to the commands that replace them.

View Source
var MODULE_REGEX = regexp.MustCompile(`module[[:blank:]]+".+"`)
View Source
var TERRAFORM_COMMANDS_THAT_DO_NOT_NEED_INIT = []string{
	"version",
}
View Source
var TERRAFORM_COMMANDS_THAT_USE_STATE = []string{
	"init",
	"apply",
	"destroy",
	"env",
	"import",
	"graph",
	"output",
	"plan",
	"push",
	"refresh",
	"show",
	"taint",
	"untaint",
	"validate",
	"force-unlock",
	"state",
}
View Source
var TERRAFORM_VERSION_REGEX = regexp.MustCompile("Terraform (v?[\\d\\.]+)(?:-dev)?(?: .+)?")

The terraform --version output is of the format: Terraform v0.9.5-dev (cad024a5fe131a546936674ef85445215bbc4226+CHANGES) where -dev and (commitid+CHANGES) is for custom builds or if TF_LOG is set for debug purposes

Functions

func CheckTerraformVersion added in v0.12.5

func CheckTerraformVersion(constraint string, terragruntOptions *options.TerragruntOptions) error

Check that the currently installed Terraform version works meets the specified version constraint and return an error if it doesn't

func CreateTerragruntCli

func CreateTerragruntCli(version string, writer io.Writer, errwriter io.Writer) *cli.App

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

func PopulateTerraformVersion added in v0.13.0

func PopulateTerraformVersion(terragruntOptions *options.TerragruntOptions) error

Populate the currently installed version of Terraform into the given terragruntOptions

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 ArgumentNotAllowed added in v0.13.0

type ArgumentNotAllowed struct {
	Argument string
	Message  string
}

func (ArgumentNotAllowed) Error added in v0.13.0

func (err ArgumentNotAllowed) Error() string

type BackendNotDefined added in v0.13.5

type BackendNotDefined struct {
	Opts        *options.TerragruntOptions
	BackendType string
}

func (BackendNotDefined) Error added in v0.13.5

func (err BackendNotDefined) Error() string

type InitNeededButDisabled added in v0.13.0

type InitNeededButDisabled string

func (InitNeededButDisabled) Error added in v0.13.0

func (err InitNeededButDisabled) Error() string

type InvalidTerraformVersion added in v0.12.5

type InvalidTerraformVersion struct {
	CurrentVersion     *version.Version
	VersionConstraints version.Constraints
}

func (InvalidTerraformVersion) Error added in v0.12.5

func (err InvalidTerraformVersion) Error() string

type InvalidTerraformVersionSyntax added in v0.12.5

type InvalidTerraformVersionSyntax string

func (InvalidTerraformVersionSyntax) Error added in v0.12.5

type TerraformSource added in v0.9.7

type TerraformSource struct {
	// A canonical version of RawSource, in URL format
	CanonicalSourceURL *url.URL

	// The folder where we should download the source to
	DownloadDir string

	// The folder in DownloadDir that should be used as the working directory for Terraform
	WorkingDir string

	// The path to a file in DownloadDir that stores the version number of the code
	VersionFile string
}

This struct represents information about Terraform source code that needs to be downloaded

func (*TerraformSource) String added in v0.9.7

func (src *TerraformSource) String() string

type UnrecognizedCommand added in v0.6.0

type UnrecognizedCommand string

func (UnrecognizedCommand) Error added in v0.6.0

func (commandName UnrecognizedCommand) Error() string

Jump to

Keyboard shortcuts

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