stacks

package
v0.0.0-...-f8ee681 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AWSSession *session.Session
View Source
var Legacy = Stack{/* contains filtered or unexported fields */}

Functions

func Next

func Next(subdir string) (uint, error)

This returns the next stack version number available for a given subdir (or overall, if blank)

Types

type Command

type Command struct {
	Stack
	Args             []string  // args for command
	Action           string    // terraform action name
	UseApplyArgs     bool      // Adds the args configured by "terracanary args" for plan/apply/destroy type commands
	Init             bool      // Perform terraform init before running command
	OutputSeparators bool      // Print big ====== boundaries around this command in output
	Interactive      bool      // Allow input from StdIn
	Stdout           io.Writer // If present, stdout will go here (otherwise, to stderr)
	Stderr           io.Writer // If present, stderr will go here (otherwise, to stderr)
}

func (Command) InitTerraform

func (c Command) InitTerraform() error

func (Command) Run

func (c Command) Run() error

type Stack

type Stack struct {
	Subdir           string
	Version          uint
	InputAlias       string // Used for input stacks to provide alternate input variable prefix
	WorkingDirectory string // Override normal working directory for Subdir
	// contains filtered or unexported fields
}

func All

func All(subdir string) (stacks []Stack, err error)

Returns stacks sorted by version, filtered by argument (or "" for any) This may include the legacy stack, if no filter is given

func New

func New(subdir string, version uint) Stack

func Parse

func Parse(subdir, vs string) (Stack, error)

Version string may be blank, meaning no version / 0

func Subtract

func Subtract(a, b []Stack) (res []Stack)

Returns stacks in a that do not appear in b

func (Stack) ActionCommand

func (s Stack) ActionCommand(action string, inputStacks []Stack, additionalArgs ...string) (*Command, error)

func (Stack) CmdOutput

func (s Stack) CmdOutput(action string, args ...string) (string, error)

This gets the entire output of an arbitrary terraform command

func (Stack) Destroy

func (s Stack) Destroy(inputStacks []Stack, additionalArgs ...string) error

Run destroy; no confirmation

func (Stack) Exists

func (s Stack) Exists() (bool, error)

func (Stack) GeneratePlan

func (s Stack) GeneratePlan(inputStacks []Stack, additionalArgs ...string) (plan []byte, err error)

func (Stack) Output

func (s Stack) Output(name string) (string, error)

This gets a single terraform output variable

func (Stack) Outputs

func (s Stack) Outputs(names ...string) (out []string, err error)

Get multiple terraform output variables, in the order specified

func (Stack) RemoveFromState

func (s Stack) RemoveFromState(names []string) error

func (Stack) RemoveState

func (s Stack) RemoveState() error

func (Stack) RunAction

func (s Stack) RunAction(action string, inputStacks []Stack, additionalArgs ...string) error

func (Stack) RunInteractiveAction

func (s Stack) RunInteractiveAction(action string, inputStacks []Stack, additionalArgs ...string) error

func (Stack) StateList

func (s Stack) StateList() (state []string, err error)

func (Stack) String

func (s Stack) String() string

Jump to

Keyboard shortcuts

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