Documentation ¶
Index ¶
- Constants
- func FormatPlan(p *terraform.Plan, c *colorstring.Colorize) string
- func FormatState(s *terraform.State, c *colorstring.Colorize) string
- type ApplyCommand
- type ColorizeUi
- type Config
- type CountHook
- type FlagVar
- type FlagVarFile
- type GraphCommand
- type Meta
- type OutputCommand
- type PlanCommand
- type RefreshCommand
- type ShowCommand
- type UiHook
- func (h *UiHook) PostApply(id string, s *terraform.ResourceState, applyerr error) (terraform.HookAction, error)
- func (h *UiHook) PreApply(id string, s *terraform.ResourceState, d *terraform.ResourceDiff) (terraform.HookAction, error)
- func (h *UiHook) PreDiff(id string, s *terraform.ResourceState) (terraform.HookAction, error)
- func (h *UiHook) PreProvision(id, provId string) (terraform.HookAction, error)
- func (h *UiHook) PreRefresh(id string, s *terraform.ResourceState) (terraform.HookAction, error)
- type VersionCommand
Constants ¶
const DefaultBackupExtention = ".backup"
DefaultBackupExtention is added to the state file to form the path
const DefaultStateFilename = "terraform.tfstate"
DefaultStateFilename is the default filename used for the state file.
const DefaultVarsFilename = "terraform.tfvars"
DefaultVarsFilename is the default filename used for vars
Variables ¶
This section is empty.
Functions ¶
func FormatPlan ¶
func FormatPlan(p *terraform.Plan, c *colorstring.Colorize) string
FormatPlan takes a plan and returns a
func FormatState ¶
func FormatState(s *terraform.State, c *colorstring.Colorize) string
FormatState takes a state and returns a string
Types ¶
type ApplyCommand ¶
type ApplyCommand struct { Meta ShutdownCh <-chan struct{} }
ApplyCommand is a Command implementation that applies a Terraform configuration and actually builds or changes infrastructure.
func (*ApplyCommand) Help ¶
func (c *ApplyCommand) Help() string
func (*ApplyCommand) Run ¶
func (c *ApplyCommand) Run(args []string) int
func (*ApplyCommand) Synopsis ¶
func (c *ApplyCommand) Synopsis() string
type ColorizeUi ¶
type ColorizeUi struct { Colorize *colorstring.Colorize OutputColor string InfoColor string ErrorColor string Ui cli.Ui }
ColoredUi is a Ui implementation that colors its output according to the given color schemes for the given type of output.
func (*ColorizeUi) Error ¶
func (u *ColorizeUi) Error(message string)
func (*ColorizeUi) Info ¶
func (u *ColorizeUi) Info(message string)
func (*ColorizeUi) Output ¶
func (u *ColorizeUi) Output(message string)
type Config ¶
type Config struct { Hooks []terraform.Hook Providers map[string]terraform.ResourceProviderFactory Ui cli.Ui }
Config is a structure used to configure many commands with Terraform configurations.
func (*Config) ContextOpts ¶
func (c *Config) ContextOpts() *terraform.ContextOpts
type CountHook ¶
type CountHook struct { Added int Changed int Removed int sync.Mutex terraform.NilHook // contains filtered or unexported fields }
CountHook is a hook that counts the number of resources added, removed, changed during the course of an apply.
func (*CountHook) PostApply ¶
func (h *CountHook) PostApply( id string, s *terraform.ResourceState, e error) (terraform.HookAction, error)
func (*CountHook) PreApply ¶
func (h *CountHook) PreApply( id string, s *terraform.ResourceState, d *terraform.ResourceDiff) (terraform.HookAction, error)
type FlagVar ¶
FlagVar is a flag.Value implementation for parsing user variables from the command-line in the format of '-var key=value'.
type FlagVarFile ¶
FlagVarFile is a flag.Value implementation for parsing user variables from the command line in the form of files. i.e. '-var-file=foo'
func (*FlagVarFile) Set ¶
func (v *FlagVarFile) Set(raw string) error
func (*FlagVarFile) String ¶
func (v *FlagVarFile) String() string
type GraphCommand ¶
type GraphCommand struct {
Meta
}
GraphCommand is a Command implementation that takes a Terraform configuration and outputs the dependency tree in graphical form.
func (*GraphCommand) Help ¶
func (c *GraphCommand) Help() string
func (*GraphCommand) Run ¶
func (c *GraphCommand) Run(args []string) int
func (*GraphCommand) Synopsis ¶
func (c *GraphCommand) Synopsis() string
type Meta ¶
type Meta struct { Color bool ContextOpts *terraform.ContextOpts Ui cli.Ui // contains filtered or unexported fields }
Meta are the meta-options that are available on all or most commands.
func (*Meta) Colorize ¶
func (m *Meta) Colorize() *colorstring.Colorize
Colorize returns the colorization structure for a command.
type OutputCommand ¶
type OutputCommand struct {
Meta
}
OutputCommand is a Command implementation that reads an output from a Terraform state and prints it.
func (*OutputCommand) Help ¶
func (c *OutputCommand) Help() string
func (*OutputCommand) Run ¶
func (c *OutputCommand) Run(args []string) int
func (*OutputCommand) Synopsis ¶
func (c *OutputCommand) Synopsis() string
type PlanCommand ¶
type PlanCommand struct {
Meta
}
PlanCommand is a Command implementation that compares a Terraform configuration to an actual infrastructure and shows the differences.
func (*PlanCommand) Help ¶
func (c *PlanCommand) Help() string
func (*PlanCommand) Run ¶
func (c *PlanCommand) Run(args []string) int
func (*PlanCommand) Synopsis ¶
func (c *PlanCommand) Synopsis() string
type RefreshCommand ¶
type RefreshCommand struct {
Meta
}
RefreshCommand is a cli.Command implementation that refreshes the state file.
func (*RefreshCommand) Help ¶
func (c *RefreshCommand) Help() string
func (*RefreshCommand) Run ¶
func (c *RefreshCommand) Run(args []string) int
func (*RefreshCommand) Synopsis ¶
func (c *RefreshCommand) Synopsis() string
type ShowCommand ¶
type ShowCommand struct {
Meta
}
ShowCommand is a Command implementation that reads and outputs the contents of a Terraform plan or state file.
func (*ShowCommand) Help ¶
func (c *ShowCommand) Help() string
func (*ShowCommand) Run ¶
func (c *ShowCommand) Run(args []string) int
func (*ShowCommand) Synopsis ¶
func (c *ShowCommand) Synopsis() string
type UiHook ¶
type UiHook struct { terraform.NilHook Colorize *colorstring.Colorize Ui cli.Ui // contains filtered or unexported fields }
func (*UiHook) PostApply ¶
func (h *UiHook) PostApply( id string, s *terraform.ResourceState, applyerr error) (terraform.HookAction, error)
func (*UiHook) PreApply ¶
func (h *UiHook) PreApply( id string, s *terraform.ResourceState, d *terraform.ResourceDiff) (terraform.HookAction, error)
func (*UiHook) PreDiff ¶
func (h *UiHook) PreDiff( id string, s *terraform.ResourceState) (terraform.HookAction, error)
func (*UiHook) PreProvision ¶
func (h *UiHook) PreProvision(id, provId string) (terraform.HookAction, error)
func (*UiHook) PreRefresh ¶
func (h *UiHook) PreRefresh( id string, s *terraform.ResourceState) (terraform.HookAction, error)
type VersionCommand ¶
VersionCommand is a Command implementation prints the version.
func (*VersionCommand) Help ¶
func (c *VersionCommand) Help() string
func (*VersionCommand) Run ¶
func (c *VersionCommand) Run(args []string) int
func (*VersionCommand) Synopsis ¶
func (c *VersionCommand) Synopsis() string