Documentation ¶
Overview ¶
This file is automatically generated by scripts/generate-plugins.go -- Do not edit!
Index ¶
- Constants
- Variables
- func BuildPluginCommandString(pluginType, pluginName string) (string, error)
- func ModulePath(args []string) (string, error)
- type ApplyCommand
- type BackendOpts
- type ColorizeUi
- type ConsoleCommand
- type CountHook
- func (h *CountHook) PostApply(n *terraform.InstanceInfo, s *terraform.InstanceState, e error) (terraform.HookAction, error)
- func (h *CountHook) PostDiff(n *terraform.InstanceInfo, d *terraform.InstanceDiff) (terraform.HookAction, error)
- func (h *CountHook) PreApply(n *terraform.InstanceInfo, s *terraform.InstanceState, ...) (terraform.HookAction, error)
- func (h *CountHook) Reset()
- type DebugCommand
- type DebugJSON2DotCommand
- type EnvCommand
- type EnvDeleteCommand
- type EnvListCommand
- type EnvNewCommand
- type EnvSelectCommand
- type FlagStringKV
- type FlagStringSlice
- type FmtCommand
- type GetCommand
- type GraphCommand
- type ImportCommand
- type InitCommand
- type InternalPluginCommand
- type Meta
- func (m *Meta) Backend(opts *BackendOpts) (backend.Enhanced, error)
- func (m *Meta) Colorize() *colorstring.Colorize
- func (m *Meta) DataDir() string
- func (m *Meta) Env() string
- func (m *Meta) Input() bool
- func (m *Meta) InputMode() terraform.InputMode
- func (m *Meta) IsLocalBackend(b backend.Backend) bool
- func (m *Meta) Module(path string) (*module.Tree, error)
- func (m *Meta) Operation() *backend.Operation
- func (m *Meta) Plan(path string) (*terraform.Plan, error)
- func (m *Meta) SetEnv(name string) error
- func (m *Meta) StateOutPath() string
- func (m *Meta) StdinPiped() bool
- func (m *Meta) UIInput() terraform.UIInput
- type OutputCommand
- type PlanCommand
- type PushCommand
- type RefreshCommand
- type ShowCommand
- type StateCommand
- type StateHook
- type StateListCommand
- type StateMeta
- type StateMvCommand
- type StatePullCommand
- type StatePushCommand
- type StateRmCommand
- type StateShowCommand
- type TaintCommand
- type UIInput
- type UiHook
- func (h *UiHook) PostApply(n *terraform.InstanceInfo, s *terraform.InstanceState, applyerr error) (terraform.HookAction, error)
- func (h *UiHook) PostImportState(n *terraform.InstanceInfo, s []*terraform.InstanceState) (terraform.HookAction, error)
- func (h *UiHook) PreApply(n *terraform.InstanceInfo, s *terraform.InstanceState, ...) (terraform.HookAction, error)
- func (h *UiHook) PreDiff(n *terraform.InstanceInfo, s *terraform.InstanceState) (terraform.HookAction, error)
- func (h *UiHook) PreImportState(n *terraform.InstanceInfo, id string) (terraform.HookAction, error)
- func (h *UiHook) PreProvision(n *terraform.InstanceInfo, provId string) (terraform.HookAction, error)
- func (h *UiHook) PreRefresh(n *terraform.InstanceInfo, s *terraform.InstanceState) (terraform.HookAction, error)
- func (h *UiHook) ProvisionOutput(n *terraform.InstanceInfo, provId string, msg string)
- type UnlockCommand
- type UntaintCommand
- type ValidateCommand
- type VersionCheckFunc
- type VersionCheckInfo
- type VersionCommand
Constants ¶
const ( // ModuleDepthDefault is the default value for // module depth, which can be overridden by flag // or env var ModuleDepthDefault = -1 // ModuleDepthEnvVar is the name of the environment variable that can be used to set module depth. ModuleDepthEnvVar = "TF_MODULE_DEPTH" )
const DefaultBackupExtension = ".backup"
DefaultBackupExtension is added to the state file to form the path
const DefaultDataDir = ".terraform"
DefaultDataDir is the default directory for storing local data.
const DefaultParallelism = 10
DefaultParallelism is the limit Terraform places on total parallel operations as it walks the dependency graph.
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
const ErrUnsupportedLocalOp = `` /* 465-byte string literal not displayed */
ErrUnsupportedLocalOp is the common error message shown for operations that require a backend.Local.
const ( // InputModeEnvVar is the environment variable that, if set to "false" or // "0", causes terraform commands to behave as if the `-input=false` flag was // specified. InputModeEnvVar = "TF_INPUT" )
const TFSPACE = "-TFSPACE-"
Variables ¶
var InternalProviders = map[string]plugin.ProviderFunc{ "alicloud": alicloudprovider.Provider, "archive": archiveprovider.Provider, "arukas": arukasprovider.Provider, "atlas": atlasprovider.Provider, "aws": awsprovider.Provider, "azure": azureprovider.Provider, "azurerm": azurermprovider.Provider, "bitbucket": bitbucketprovider.Provider, "chef": chefprovider.Provider, "circonus": circonusprovider.Provider, "clc": clcprovider.Provider, "cloudflare": cloudflareprovider.Provider, "cloudstack": cloudstackprovider.Provider, "cobbler": cobblerprovider.Provider, "consul": consulprovider.Provider, "datadog": datadogprovider.Provider, "digitalocean": digitaloceanprovider.Provider, "dme": dmeprovider.Provider, "dns": dnsprovider.Provider, "dnsimple": dnsimpleprovider.Provider, "docker": dockerprovider.Provider, "dyn": dynprovider.Provider, "external": externalprovider.Provider, "fastly": fastlyprovider.Provider, "github": githubprovider.Provider, "gitlab": gitlabprovider.Provider, "google": googleprovider.Provider, "grafana": grafanaprovider.Provider, "heroku": herokuprovider.Provider, "http": httpprovider.Provider, "icinga2": icinga2provider.Provider, "ignition": ignitionprovider.Provider, "influxdb": influxdbprovider.Provider, "kubernetes": kubernetesprovider.Provider, "librato": libratoprovider.Provider, "local": localprovider.Provider, "logentries": logentriesprovider.Provider, "mailgun": mailgunprovider.Provider, "mysql": mysqlprovider.Provider, "newrelic": newrelicprovider.Provider, "nomad": nomadprovider.Provider, "ns1": ns1provider.Provider, "null": nullprovider.Provider, "oneandone": oneandoneprovider.Provider, "openstack": openstackprovider.Provider, "opsgenie": opsgenieprovider.Provider, "ovh": ovhprovider.Provider, "packet": packetprovider.Provider, "pagerduty": pagerdutyprovider.Provider, "postgresql": postgresqlprovider.Provider, "powerdns": powerdnsprovider.Provider, "profitbricks": profitbricksprovider.Provider, "rabbitmq": rabbitmqprovider.Provider, "rancher": rancherprovider.Provider, "random": randomprovider.Provider, "rundeck": rundeckprovider.Provider, "scaleway": scalewayprovider.Provider, "softlayer": softlayerprovider.Provider, "spotinst": spotinstprovider.Provider, "statuscake": statuscakeprovider.Provider, "template": templateprovider.Provider, "terraform": terraformprovider.Provider, "test": testprovider.Provider, "tls": tlsprovider.Provider, "triton": tritonprovider.Provider, "ultradns": ultradnsprovider.Provider, "vault": vaultprovider.Provider, "vcd": vcdprovider.Provider, "vsphere": vsphereprovider.Provider, }
var InternalProvisioners = map[string]plugin.ProvisionerFunc{ "file": fileprovisioner.Provisioner, "local-exec": localexecprovisioner.Provisioner, "remote-exec": remoteexecprovisioner.Provisioner, }
Functions ¶
func BuildPluginCommandString ¶
BuildPluginCommandString builds a special string for executing internal plugins. It has the following format:
/path/to/terraform-TFSPACE-internal-plugin-TFSPACE-terraform-provider-aws
We split the string on -TFSPACE- to build the command executor. The reason we use -TFSPACE- is so we can support spaces in the /path/to/terraform part.
func ModulePath ¶
ModulePath returns the path to the root module from the CLI args.
This centralizes the logic for any commands that expect a module path on their CLI args. This will verify that only one argument is given and that it is a path to configuration.
If your command accepts more than one arg, then change the slice bounds to pass validation.
Types ¶
type ApplyCommand ¶
type ApplyCommand struct { Meta // If true, then this apply command will become the "destroy" // command. It is just like apply but only processes a destroy. Destroy bool // When this channel is closed, the apply will be cancelled. 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 BackendOpts ¶
type BackendOpts struct { // ConfigPath is a path to a file or directory containing the backend // configuration (declaration). ConfigPath string // ConfigFile is a path to a file that contains configuration that // is merged directly into the backend configuration when loaded // from a file. ConfigFile string // ConfigExtra is extra configuration to merge into the backend // configuration after the extra file above. ConfigExtra map[string]interface{} // Plan is a plan that is being used. If this is set, the backend // configuration and output configuration will come from this plan. Plan *terraform.Plan // Init should be set to true if initialization is allowed. If this is // false, then any configuration that requires configuration will show // an error asking the user to reinitialize. Init bool // ForceLocal will force a purely local backend, including state. // You probably don't want to set this. ForceLocal bool }
BackendOpts are the options used to initialize a backend.Backend.
type ColorizeUi ¶
type ColorizeUi struct { Colorize *colorstring.Colorize OutputColor string InfoColor string ErrorColor string WarnColor 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)
func (*ColorizeUi) Warn ¶
func (u *ColorizeUi) Warn(message string)
type ConsoleCommand ¶
type ConsoleCommand struct { Meta // When this channel is closed, the apply will be cancelled. ShutdownCh <-chan struct{} }
ConsoleCommand is a Command implementation that applies a Terraform configuration and actually builds or changes infrastructure.
func (*ConsoleCommand) Help ¶
func (c *ConsoleCommand) Help() string
func (*ConsoleCommand) Run ¶
func (c *ConsoleCommand) Run(args []string) int
func (*ConsoleCommand) Synopsis ¶
func (c *ConsoleCommand) Synopsis() string
type CountHook ¶
type CountHook struct { Added int Changed int Removed int ToAdd int ToChange int ToRemove int ToRemoveAndAdd 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( n *terraform.InstanceInfo, s *terraform.InstanceState, e error) (terraform.HookAction, error)
func (*CountHook) PostDiff ¶
func (h *CountHook) PostDiff( n *terraform.InstanceInfo, d *terraform.InstanceDiff) ( terraform.HookAction, error)
func (*CountHook) PreApply ¶
func (h *CountHook) PreApply( n *terraform.InstanceInfo, s *terraform.InstanceState, d *terraform.InstanceDiff) (terraform.HookAction, error)
type DebugCommand ¶
type DebugCommand struct {
Meta
}
DebugCommand is a Command implementation that just shows help for the subcommands nested below it.
func (*DebugCommand) Help ¶
func (c *DebugCommand) Help() string
func (*DebugCommand) Run ¶
func (c *DebugCommand) Run(args []string) int
func (*DebugCommand) Synopsis ¶
func (c *DebugCommand) Synopsis() string
type DebugJSON2DotCommand ¶
type DebugJSON2DotCommand struct {
Meta
}
DebugJSON2DotCommand is a Command implementation that translates a json graph debug log to Dot format.
func (*DebugJSON2DotCommand) Help ¶
func (c *DebugJSON2DotCommand) Help() string
func (*DebugJSON2DotCommand) Run ¶
func (c *DebugJSON2DotCommand) Run(args []string) int
func (*DebugJSON2DotCommand) Synopsis ¶
func (c *DebugJSON2DotCommand) Synopsis() string
type EnvCommand ¶
type EnvCommand struct {
Meta
}
EnvCommand is a Command Implementation that manipulates local state environments.
func (*EnvCommand) Help ¶
func (c *EnvCommand) Help() string
func (*EnvCommand) Run ¶
func (c *EnvCommand) Run(args []string) int
func (*EnvCommand) Synopsis ¶
func (c *EnvCommand) Synopsis() string
type EnvDeleteCommand ¶
type EnvDeleteCommand struct {
Meta
}
func (*EnvDeleteCommand) Help ¶
func (c *EnvDeleteCommand) Help() string
func (*EnvDeleteCommand) Run ¶
func (c *EnvDeleteCommand) Run(args []string) int
func (*EnvDeleteCommand) Synopsis ¶
func (c *EnvDeleteCommand) Synopsis() string
type EnvListCommand ¶
type EnvListCommand struct {
Meta
}
func (*EnvListCommand) Help ¶
func (c *EnvListCommand) Help() string
func (*EnvListCommand) Run ¶
func (c *EnvListCommand) Run(args []string) int
func (*EnvListCommand) Synopsis ¶
func (c *EnvListCommand) Synopsis() string
type EnvNewCommand ¶
type EnvNewCommand struct {
Meta
}
func (*EnvNewCommand) Help ¶
func (c *EnvNewCommand) Help() string
func (*EnvNewCommand) Run ¶
func (c *EnvNewCommand) Run(args []string) int
func (*EnvNewCommand) Synopsis ¶
func (c *EnvNewCommand) Synopsis() string
type EnvSelectCommand ¶
type EnvSelectCommand struct {
Meta
}
func (*EnvSelectCommand) Help ¶
func (c *EnvSelectCommand) Help() string
func (*EnvSelectCommand) Run ¶
func (c *EnvSelectCommand) Run(args []string) int
func (*EnvSelectCommand) Synopsis ¶
func (c *EnvSelectCommand) Synopsis() string
type FlagStringKV ¶
FlagStringKV is a flag.Value implementation for parsing user variables from the command-line in the format of '-var key=value', where value is only ever a primitive.
func (*FlagStringKV) Set ¶
func (v *FlagStringKV) Set(raw string) error
func (*FlagStringKV) String ¶
func (v *FlagStringKV) String() string
type FlagStringSlice ¶
type FlagStringSlice []string
FlagStringSlice is a flag.Value implementation for parsing targets from the command line, e.g. -target=aws_instance.foo -target=aws_vpc.bar
func (*FlagStringSlice) Set ¶
func (v *FlagStringSlice) Set(raw string) error
func (*FlagStringSlice) String ¶
func (v *FlagStringSlice) String() string
type FmtCommand ¶
type FmtCommand struct { Meta // contains filtered or unexported fields }
FmtCommand is a Command implementation that rewrites Terraform config files to a canonical format and style.
func (*FmtCommand) Help ¶
func (c *FmtCommand) Help() string
func (*FmtCommand) Run ¶
func (c *FmtCommand) Run(args []string) int
func (*FmtCommand) Synopsis ¶
func (c *FmtCommand) Synopsis() string
type GetCommand ¶
type GetCommand struct {
Meta
}
GetCommand is a Command implementation that takes a Terraform configuration and downloads all the modules.
func (*GetCommand) Help ¶
func (c *GetCommand) Help() string
func (*GetCommand) Run ¶
func (c *GetCommand) Run(args []string) int
func (*GetCommand) Synopsis ¶
func (c *GetCommand) Synopsis() 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 ImportCommand ¶
type ImportCommand struct {
Meta
}
ImportCommand is a cli.Command implementation that imports resources into the Terraform state.
func (*ImportCommand) Help ¶
func (c *ImportCommand) Help() string
func (*ImportCommand) Run ¶
func (c *ImportCommand) Run(args []string) int
func (*ImportCommand) Synopsis ¶
func (c *ImportCommand) Synopsis() string
type InitCommand ¶
type InitCommand struct {
Meta
}
InitCommand is a Command implementation that takes a Terraform module and clones it to the working directory.
func (*InitCommand) Help ¶
func (c *InitCommand) Help() string
func (*InitCommand) Run ¶
func (c *InitCommand) Run(args []string) int
func (*InitCommand) Synopsis ¶
func (c *InitCommand) Synopsis() string
type InternalPluginCommand ¶
type InternalPluginCommand struct {
Meta
}
InternalPluginCommand is a Command implementation that allows plugins to be compiled into the main Terraform binary and executed via a subcommand.
func (*InternalPluginCommand) Help ¶
func (c *InternalPluginCommand) Help() string
func (*InternalPluginCommand) Run ¶
func (c *InternalPluginCommand) Run(args []string) int
func (*InternalPluginCommand) Synopsis ¶
func (c *InternalPluginCommand) Synopsis() string
type Meta ¶
type Meta struct { Color bool // True if output should be colored ContextOpts *terraform.ContextOpts // Opts copied to initialize Ui cli.Ui // Ui for output // ExtraHooks are extra hooks to add to the context. ExtraHooks []terraform.Hook // contains filtered or unexported fields }
Meta are the meta-options that are available on all or most commands.
func (*Meta) Backend ¶
func (m *Meta) Backend(opts *BackendOpts) (backend.Enhanced, error)
Backend initializes and returns the backend for this CLI session.
The backend is used to perform the actual Terraform operations. This abstraction enables easily sliding in new Terraform behavior such as remote state storage, remote operations, etc. while allowing the CLI to remain mostly identical.
This will initialize a new backend for each call, which can carry some overhead with it. Please reuse the returned value for optimal behavior.
Only one backend should be used per Meta. This function is stateful and is unsafe to create multiple backends used at once. This function can be called multiple times with each backend being "live" (usable) one at a time.
func (*Meta) Colorize ¶
func (m *Meta) Colorize() *colorstring.Colorize
Colorize returns the colorization structure for a command.
func (*Meta) Env ¶
Env returns the name of the currently configured environment, corresponding to the desired named state.
func (*Meta) InputMode ¶
InputMode returns the type of input we should ask for in the form of terraform.InputMode which is passed directly to Context.Input.
func (*Meta) IsLocalBackend ¶
IsLocalBackend returns true if the backend is a local backend. We use this for some checks that require a remote backend.
func (*Meta) Module ¶
Module loads the module tree for the given root path.
It expects the modules to already be downloaded. This will never download any modules.
func (*Meta) Operation ¶
Operation initializes a new backend.Operation struct.
This prepares the operation. After calling this, the caller is expected to modify fields of the operation such as Sequence to specify what will be called.
func (*Meta) Plan ¶
Plan returns the plan for the given path.
This only has an effect if the path itself looks like a plan. If error is nil and the plan is nil, then the path didn't look like a plan.
Error will be non-nil if path looks like a plan and loading the plan failed.
func (*Meta) StateOutPath ¶
StateOutPath returns the true output path for the state file
func (*Meta) StdinPiped ¶
StdinPiped returns true if the input is piped.
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 PushCommand ¶
type PushCommand struct { Meta // contains filtered or unexported fields }
func (*PushCommand) Help ¶
func (c *PushCommand) Help() string
func (*PushCommand) Run ¶
func (c *PushCommand) Run(args []string) int
func (*PushCommand) Synopsis ¶
func (c *PushCommand) 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 StateCommand ¶
type StateCommand struct {
StateMeta
}
StateCommand is a Command implementation that just shows help for the subcommands nested below it.
func (*StateCommand) Help ¶
func (c *StateCommand) Help() string
func (*StateCommand) Run ¶
func (c *StateCommand) Run(args []string) int
func (*StateCommand) Synopsis ¶
func (c *StateCommand) Synopsis() string
type StateHook ¶
StateHook is a hook that continuously updates the state by calling WriteState on a state.State.
func (*StateHook) PostStateUpdate ¶
type StateListCommand ¶
StateListCommand is a Command implementation that lists the resources within a state file.
func (*StateListCommand) Help ¶
func (c *StateListCommand) Help() string
func (*StateListCommand) Run ¶
func (c *StateListCommand) Run(args []string) int
func (*StateListCommand) Synopsis ¶
func (c *StateListCommand) Synopsis() string
type StateMeta ¶
type StateMeta struct{}
StateMeta is the meta struct that should be embedded in state subcommands.
type StateMvCommand ¶
StateMvCommand is a Command implementation that shows a single resource.
func (*StateMvCommand) Help ¶
func (c *StateMvCommand) Help() string
func (*StateMvCommand) Run ¶
func (c *StateMvCommand) Run(args []string) int
func (*StateMvCommand) Synopsis ¶
func (c *StateMvCommand) Synopsis() string
type StatePullCommand ¶
StatePullCommand is a Command implementation that shows a single resource.
func (*StatePullCommand) Help ¶
func (c *StatePullCommand) Help() string
func (*StatePullCommand) Run ¶
func (c *StatePullCommand) Run(args []string) int
func (*StatePullCommand) Synopsis ¶
func (c *StatePullCommand) Synopsis() string
type StatePushCommand ¶
StatePushCommand is a Command implementation that shows a single resource.
func (*StatePushCommand) Help ¶
func (c *StatePushCommand) Help() string
func (*StatePushCommand) Run ¶
func (c *StatePushCommand) Run(args []string) int
func (*StatePushCommand) Synopsis ¶
func (c *StatePushCommand) Synopsis() string
type StateRmCommand ¶
StateRmCommand is a Command implementation that shows a single resource.
func (*StateRmCommand) Help ¶
func (c *StateRmCommand) Help() string
func (*StateRmCommand) Run ¶
func (c *StateRmCommand) Run(args []string) int
func (*StateRmCommand) Synopsis ¶
func (c *StateRmCommand) Synopsis() string
type StateShowCommand ¶
StateShowCommand is a Command implementation that shows a single resource.
func (*StateShowCommand) Help ¶
func (c *StateShowCommand) Help() string
func (*StateShowCommand) Run ¶
func (c *StateShowCommand) Run(args []string) int
func (*StateShowCommand) Synopsis ¶
func (c *StateShowCommand) Synopsis() string
type TaintCommand ¶
type TaintCommand struct {
Meta
}
TaintCommand is a cli.Command implementation that manually taints a resource, marking it for recreation.
func (*TaintCommand) Help ¶
func (c *TaintCommand) Help() string
func (*TaintCommand) Run ¶
func (c *TaintCommand) Run(args []string) int
func (*TaintCommand) Synopsis ¶
func (c *TaintCommand) Synopsis() string
type UIInput ¶
type UIInput struct { // Colorize will color the output. Colorize *colorstring.Colorize // Reader and Writer for IO. If these aren't set, they will default to // Stdout and Stderr respectively. Reader io.Reader Writer io.Writer // contains filtered or unexported fields }
UIInput is an implementation of terraform.UIInput that asks the CLI for input stdin.
type UiHook ¶
type UiHook struct { terraform.NilHook Colorize *colorstring.Colorize Ui cli.Ui PeriodicUiTimer time.Duration // contains filtered or unexported fields }
func (*UiHook) PostApply ¶
func (h *UiHook) PostApply( n *terraform.InstanceInfo, s *terraform.InstanceState, applyerr error) (terraform.HookAction, error)
func (*UiHook) PostImportState ¶
func (h *UiHook) PostImportState( n *terraform.InstanceInfo, s []*terraform.InstanceState) (terraform.HookAction, error)
func (*UiHook) PreApply ¶
func (h *UiHook) PreApply( n *terraform.InstanceInfo, s *terraform.InstanceState, d *terraform.InstanceDiff) (terraform.HookAction, error)
func (*UiHook) PreDiff ¶
func (h *UiHook) PreDiff( n *terraform.InstanceInfo, s *terraform.InstanceState) (terraform.HookAction, error)
func (*UiHook) PreImportState ¶
func (h *UiHook) PreImportState( n *terraform.InstanceInfo, id string) (terraform.HookAction, error)
func (*UiHook) PreProvision ¶
func (h *UiHook) PreProvision( n *terraform.InstanceInfo, provId string) (terraform.HookAction, error)
func (*UiHook) PreRefresh ¶
func (h *UiHook) PreRefresh( n *terraform.InstanceInfo, s *terraform.InstanceState) (terraform.HookAction, error)
func (*UiHook) ProvisionOutput ¶
func (h *UiHook) ProvisionOutput( n *terraform.InstanceInfo, provId string, msg string)
type UnlockCommand ¶
type UnlockCommand struct {
Meta
}
UnlockCommand is a cli.Command implementation that manually unlocks the state.
func (*UnlockCommand) Help ¶
func (c *UnlockCommand) Help() string
func (*UnlockCommand) Run ¶
func (c *UnlockCommand) Run(args []string) int
func (*UnlockCommand) Synopsis ¶
func (c *UnlockCommand) Synopsis() string
type UntaintCommand ¶
type UntaintCommand struct {
Meta
}
UntaintCommand is a cli.Command implementation that manually untaints a resource, marking it as primary and ready for service.
func (*UntaintCommand) Help ¶
func (c *UntaintCommand) Help() string
func (*UntaintCommand) Run ¶
func (c *UntaintCommand) Run(args []string) int
func (*UntaintCommand) Synopsis ¶
func (c *UntaintCommand) Synopsis() string
type ValidateCommand ¶
type ValidateCommand struct {
Meta
}
ValidateCommand is a Command implementation that validates the terraform files
func (*ValidateCommand) Help ¶
func (c *ValidateCommand) Help() string
func (*ValidateCommand) Run ¶
func (c *ValidateCommand) Run(args []string) int
func (*ValidateCommand) Synopsis ¶
func (c *ValidateCommand) Synopsis() string
type VersionCheckFunc ¶
type VersionCheckFunc func() (VersionCheckInfo, error)
VersionCheckFunc is the callback called by the Version command to check if there is a new version of Terraform.
type VersionCheckInfo ¶
VersionCheckInfo is the return value for the VersionCheckFunc callback and tells the Version command information about the latest version of Terraform.
type VersionCommand ¶
type VersionCommand struct { Meta Revision string Version string VersionPrerelease string CheckFunc VersionCheckFunc }
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
Source Files ¶
- apply.go
- cli_ui.go
- command.go
- console.go
- console_interactive.go
- counthookaction_string.go
- debug_command.go
- debug_json2dot.go
- env_command.go
- env_delete.go
- env_list.go
- env_new.go
- env_select.go
- flag_kv.go
- fmt.go
- get.go
- graph.go
- hcl_printer.go
- hook_count.go
- hook_count_action.go
- hook_state.go
- hook_ui.go
- import.go
- init.go
- internal_plugin.go
- internal_plugin_list.go
- meta.go
- meta_backend.go
- meta_backend_migrate.go
- meta_new.go
- module_storage.go
- output.go
- plan.go
- push.go
- refresh.go
- show.go
- state_command.go
- state_list.go
- state_meta.go
- state_mv.go
- state_pull.go
- state_push.go
- state_rm.go
- state_show.go
- taint.go
- ui_input.go
- unlock.go
- untaint.go
- validate.go
- version.go
Directories ¶
Path | Synopsis |
---|---|
Package state exposes common helpers for working with state from the CLI.
|
Package state exposes common helpers for working with state from the CLI. |
Package format contains helpers for formatting various Terraform structures for human-readabout output.
|
Package format contains helpers for formatting various Terraform structures for human-readabout output. |