Documentation ¶
Index ¶
- type Command
- type Config
- func (c *Config) ApplyOptions() []tfexec.ApplyOption
- func (c *Config) DestroyOptions() []tfexec.DestroyOption
- func (c *Config) FromProto(pcfg *pb.Terraform_Runner_Config)
- func (c *Config) InitOptions() []tfexec.InitOption
- func (c *Config) NewExecSubCmd() *command.Command
- func (c *Config) OutputOptions() []tfexec.OutputOption
- func (c *Config) PlanOptions() []tfexec.PlanOption
- func (c *Config) Proto() *pb.Terraform_Runner_Config
- func (c *Config) ShowOptions() []tfexec.ShowOption
- func (c *Config) Terraform() (*tfexec.Terraform, error)
- func (c *Config) WithModule(mod *pb.Terraform_Module)
- type ConfigOpt
- func WithBinPath(path string) ConfigOpt
- func WithConfigPath(path string) ConfigOpt
- func WithDirPath(path string) ConfigOpt
- func WithEnv(env map[string]string) ConfigOpt
- func WithExecSubCommand(cmd string) ConfigOpt
- func WithLockTimeout(timeout time.Duration) ConfigOpt
- func WithNoBackend() ConfigOpt
- func WithNoDownload() ConfigOpt
- func WithNoLock() ConfigOpt
- func WithNoReconfigure() ConfigOpt
- func WithNoRefresh() ConfigOpt
- func WithParallelism(p int) ConfigOpt
- func WithProtoConfig(pcfg *pb.Terraform_Runner_Config) ConfigOpt
- func WithRefreshOnly() ConfigOpt
- func WithUI(ui *terminal.UI) ConfigOpt
- func WithUpgrade() ConfigOpt
- type Flag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { UI *terminal.UI // UI to use for input/output BinPath string // where terraform binary is ConfigPath string // where the terraformrc config is DirPath string // what directory to execute the command in Env map[string]string // environment variables ExecSubCmd string // raw command to run OutputName string // output name FailOnWarnings bool // fail on warning diagnostics Flags *pb.Terraform_Runner_Config_Flags }
Config is the Terraform CLI executor configuration.
func (*Config) ApplyOptions ¶
func (c *Config) ApplyOptions() []tfexec.ApplyOption
ApplyOptions are the apply command options.
func (*Config) DestroyOptions ¶
func (c *Config) DestroyOptions() []tfexec.DestroyOption
DestroyOptions are the destroy command options.
func (*Config) FromProto ¶
func (c *Config) FromProto(pcfg *pb.Terraform_Runner_Config)
FromProto unmarshals and instance of a proto terraform executor configuration into itself.
func (*Config) InitOptions ¶
func (c *Config) InitOptions() []tfexec.InitOption
InitOptions are the init command options.
func (*Config) NewExecSubCmd ¶
NewExecSubCmd creates a new instance of a command to run a terraform sub-command.
func (*Config) OutputOptions ¶
func (c *Config) OutputOptions() []tfexec.OutputOption
OutputOptions are the output commands options.
func (*Config) PlanOptions ¶
func (c *Config) PlanOptions() []tfexec.PlanOption
PlanOptions are the plan command options.
func (*Config) Proto ¶
func (c *Config) Proto() *pb.Terraform_Runner_Config
Proto returns the instance of config as proto terraform executor config.
func (*Config) ShowOptions ¶
func (c *Config) ShowOptions() []tfexec.ShowOption
ShowOptions are the show command options.
func (*Config) WithModule ¶
func (c *Config) WithModule(mod *pb.Terraform_Module)
WithModule updates the module directory and config path of the Terraform config file with that of a Terraform_Module.
type ConfigOpt ¶
type ConfigOpt func(*Config)
ConfigOpt is a Terraform CLI executor configuration option.
func WithBinPath ¶
WithBinPath sets the terraform binary path.
func WithConfigPath ¶
WithConfigPath sets the terraform.rc path.
func WithDirPath ¶
WithDirPath sets the terraform module directory path.
func WithExecSubCommand ¶
WithExecSubCommand set the raw sub-command.
func WithLockTimeout ¶
WithLockTimeout sets the state lock timeout.
func WithNoDownload ¶
func WithNoDownload() ConfigOpt
WithNoDownload disables module and provider downloading during init.
func WithNoReconfigure ¶
func WithNoReconfigure() ConfigOpt
WithNoReconfigure don't reconfigure the backend during.
func WithNoRefresh ¶
func WithNoRefresh() ConfigOpt
WithNoRefresh disables refreshing during plan and apply.
func WithProtoConfig ¶
func WithProtoConfig(pcfg *pb.Terraform_Runner_Config) ConfigOpt
WithProtoConfig sets configuration from a proto config.
func WithUpgrade ¶
func WithUpgrade() ConfigOpt
WithUpgrade upgrades the terraform providers and modules during init.