configstack

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoTerraformModulesFound = fmt.Errorf("Could not find any subfolders with Terragrunt configuration files")

Functions

func CheckForCycles

func CheckForCycles(modules []*TerraformModule) error

Check for dependency cycles in the given list of modules and return an error if one is found

func RunModules

func RunModules(modules []*TerraformModule) error

Run the given map of module path to runningModule. To "run" a module, execute the RunTerragrunt command in its TerragruntOptions object. The modules will be executed in an order determined by their inter-dependencies, using as much concurrency as possible.

func RunModulesReverseOrder

func RunModulesReverseOrder(modules []*TerraformModule) error

Run the given map of module path to runningModule. To "run" a module, execute the RunTerragrunt command in its TerragruntOptions object. The modules will be executed in the reverse order of their inter-dependencies, using as much concurrency as possible.

Types

type DependencyCycle

type DependencyCycle []string

func (DependencyCycle) Error

func (err DependencyCycle) Error() string

type DependencyFinishedWithError

type DependencyFinishedWithError struct {
	Module     *TerraformModule
	Dependency *TerraformModule
	Err        error
}

func (DependencyFinishedWithError) Error

func (err DependencyFinishedWithError) Error() string

func (DependencyFinishedWithError) ExitStatus added in v0.12.14

func (this DependencyFinishedWithError) ExitStatus() (int, error)

type DependencyNotFoundWhileCrossLinking

type DependencyNotFoundWhileCrossLinking struct {
	Module     *runningModule
	Dependency *TerraformModule
}

func (DependencyNotFoundWhileCrossLinking) Error

type DependencyOrder

type DependencyOrder int

This controls in what order dependencies should be enforced between modules

const (
	NormalOrder DependencyOrder = iota
	ReverseOrder
)

type ErrorParsingModulePath added in v0.14.9

type ErrorParsingModulePath struct {
	ModuleSourceUrl string
}

func (ErrorParsingModulePath) Error added in v0.14.9

func (err ErrorParsingModulePath) Error() string

type ErrorProcessingModule added in v0.13.12

type ErrorProcessingModule struct {
	UnderlyingError       error
	ModulePath            string
	HowThisModuleWasFound string
}

func (ErrorProcessingModule) Error added in v0.13.12

func (err ErrorProcessingModule) Error() string

type InfiniteRecursion added in v0.13.15

type InfiniteRecursion struct {
	RecursionLevel int
	Modules        map[string]*TerraformModule
}

func (InfiniteRecursion) Error added in v0.13.15

func (err InfiniteRecursion) Error() string

type InvalidSourceUrl added in v0.13.13

type InvalidSourceUrl struct {
	ModulePath       string
	ModuleSourceUrl  string
	TerragruntSource string
}

func (InvalidSourceUrl) Error added in v0.13.13

func (err InvalidSourceUrl) Error() string

type ModuleStatus

type ModuleStatus int

Represents the status of a module that we are trying to apply as part of the apply-all or destroy-all command

const (
	Waiting ModuleStatus = iota
	Running
	Finished
)

type MultiError

type MultiError struct {
	Errors []error
}

func (MultiError) Error

func (err MultiError) Error() string

func (MultiError) ExitStatus added in v0.12.14

func (this MultiError) ExitStatus() (int, error)

type RunningModuleByPath

type RunningModuleByPath []*runningModule

func (RunningModuleByPath) Len

func (byPath RunningModuleByPath) Len() int

func (RunningModuleByPath) Less

func (byPath RunningModuleByPath) Less(i, j int) bool

func (RunningModuleByPath) Swap

func (byPath RunningModuleByPath) Swap(i, j int)

type Stack

type Stack struct {
	Path    string
	Modules []*TerraformModule
}

Represents a stack of Terraform modules (i.e. folders with Terraform templates) that you can "spin up" or "spin down" in a single command

func FindStackInSubfolders

func FindStackInSubfolders(terragruntOptions *options.TerragruntOptions) (*Stack, error)

Find all the Terraform modules in the subfolders of the working directory of the given TerragruntOptions and assemble them into a Stack object that can be applied or destroyed in a single command

func (*Stack) Apply

func (stack *Stack) Apply(terragruntOptions *options.TerragruntOptions) error

Apply all the modules in the given stack, making sure to apply the dependencies of each module in the stack in the proper order.

func (*Stack) CheckForCycles

func (stack *Stack) CheckForCycles() error

Return an error if there is a dependency cycle in the modules of this stack.

func (*Stack) Destroy

func (stack *Stack) Destroy(terragruntOptions *options.TerragruntOptions) error

Destroy all the modules in the given stack, making sure to destroy the dependencies of each module in the stack in the proper order.

func (*Stack) Output

func (stack *Stack) Output(terragruntOptions *options.TerragruntOptions) error

Output prints the outputs of all the modules in the given stack in their specified order.

func (*Stack) Plan added in v0.12.13

func (stack *Stack) Plan(terragruntOptions *options.TerragruntOptions) error

Plan execute plan in the given stack in their specified order.

func (*Stack) String

func (stack *Stack) String() string

Render this stack as a human-readable string

func (*Stack) Validate added in v0.13.12

func (stack *Stack) Validate(terragruntOptions *options.TerragruntOptions) error

Validate runs terraform validate on each module

type TerraformModule

type TerraformModule struct {
	Path                 string
	Dependencies         []*TerraformModule
	Config               config.TerragruntConfig
	TerragruntOptions    *options.TerragruntOptions
	AssumeAlreadyApplied bool
	FlagExcluded         bool
}

Represents a single module (i.e. folder with Terraform templates), including the Terragrunt configuration for that module and the list of other modules that this module depends on

func ResolveTerraformModules

func ResolveTerraformModules(terragruntConfigPaths []string, terragruntOptions *options.TerragruntOptions, howThesePathsWereFound string) ([]*TerraformModule, error)

Go through each of the given Terragrunt configuration files and resolve the module that configuration file represents into a TerraformModule struct. Return the list of these TerraformModule structs.

func (*TerraformModule) String

func (module *TerraformModule) String() string

Render this module as a human-readable string

type TerraformModuleByPath

type TerraformModuleByPath []*TerraformModule

func (TerraformModuleByPath) Len

func (byPath TerraformModuleByPath) Len() int

func (TerraformModuleByPath) Less

func (byPath TerraformModuleByPath) Less(i, j int) bool

func (TerraformModuleByPath) Swap

func (byPath TerraformModuleByPath) Swap(i, j int)

type UnrecognizedDependency

type UnrecognizedDependency struct {
	ModulePath            string
	DependencyPath        string
	TerragruntConfigPaths []string
}

func (UnrecognizedDependency) Error

func (err UnrecognizedDependency) Error() string

Jump to

Keyboard shortcuts

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