tfexec

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MPL-2.0 Imports: 12 Imported by: 238

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddrOption

type AddrOption struct {
	// contains filtered or unexported fields
}

func Addr

func Addr(addr string) *AddrOption

type AllowMissingConfigOption

type AllowMissingConfigOption struct {
	// contains filtered or unexported fields
}

func AllowMissingConfig

func AllowMissingConfig(allowMissingConfig bool) *AllowMissingConfigOption

type ApplyOption

type ApplyOption interface {
	// contains filtered or unexported methods
}

type BackendConfigOption

type BackendConfigOption struct {
	// contains filtered or unexported fields
}

func BackendConfig

func BackendConfig(backendConfig string) *BackendConfigOption

type BackendOption

type BackendOption struct {
	// contains filtered or unexported fields
}

func Backend

func Backend(backend bool) *BackendOption

type BackupOption

type BackupOption struct {
	// contains filtered or unexported fields
}

func Backup

func Backup(path string) *BackupOption

type ConfigOption

type ConfigOption struct {
	// contains filtered or unexported fields
}

func Config

func Config(path string) *ConfigOption

type DestroyFlagOption

type DestroyFlagOption struct {
	// contains filtered or unexported fields
}

named to prevent conflict with DestroyOption interface

func Destroy

func Destroy(destroy bool) *DestroyFlagOption

type DestroyOption

type DestroyOption interface {
	// contains filtered or unexported methods
}

type DirOrPlanOption

type DirOrPlanOption struct {
	// contains filtered or unexported fields
}

func DirOrPlan

func DirOrPlan(path string) *DirOrPlanOption

type Err

type Err struct {
	// contains filtered or unexported fields
}

catchall error

func (*Err) Error

func (e *Err) Error() string

type ErrCLIUsage

type ErrCLIUsage struct {
	// contains filtered or unexported fields
}

Terraform CLI indicates usage errors in three different ways: either 1. Exit 1, with a custom error message on stderr. 2. Exit 1, with command usage logged to stderr. 3. Exit 127, with command usage logged to stdout. Currently cases 1 and 2 are handled. TODO KEM: Handle exit 127 case. How does this work on non-Unix platforms?

func (*ErrCLIUsage) Error

func (e *ErrCLIUsage) Error() string

type ErrNoConfig

type ErrNoConfig struct {
	// contains filtered or unexported fields
}

func (*ErrNoConfig) Error

func (e *ErrNoConfig) Error() string

type ErrNoInit

type ErrNoInit struct {
	// contains filtered or unexported fields
}

func (*ErrNoInit) Error

func (e *ErrNoInit) Error() string

type ErrNoSuitableBinary

type ErrNoSuitableBinary struct {
	// contains filtered or unexported fields
}

func (*ErrNoSuitableBinary) Error

func (e *ErrNoSuitableBinary) Error() string

type ErrVersionMismatch

type ErrVersionMismatch struct{}

Not yet implemented. Intended for use when the detected Terraform version is not compatible with the command or flags being used in this invocation.

type ForceCopyOption

type ForceCopyOption struct {
	// contains filtered or unexported fields
}

func ForceCopy

func ForceCopy(forceCopy bool) *ForceCopyOption

type FromModuleOption

type FromModuleOption struct {
	// contains filtered or unexported fields
}

func FromModule

func FromModule(source string) *FromModuleOption

type GetOption

type GetOption struct {
	// contains filtered or unexported fields
}

func Get

func Get(get bool) *GetOption

type GetPluginsOption

type GetPluginsOption struct {
	// contains filtered or unexported fields
}

func GetPlugins

func GetPlugins(getPlugins bool) *GetPluginsOption

type IdOption

type IdOption struct {
	// contains filtered or unexported fields
}

func Id

func Id(id string) *IdOption

type ImportOption

type ImportOption interface {
	// contains filtered or unexported methods
}

type InitOption

type InitOption interface {
	// contains filtered or unexported methods
}

type LockOption

type LockOption struct {
	// contains filtered or unexported fields
}

func Lock

func Lock(lock bool) *LockOption

type LockTimeoutOption

type LockTimeoutOption struct {
	// contains filtered or unexported fields
}

func LockTimeout

func LockTimeout(lockTimeout string) *LockTimeoutOption

type OutOption

type OutOption struct {
	// contains filtered or unexported fields
}

func Out

func Out(path string) *OutOption

type OutputMeta

type OutputMeta struct {
	Sensitive bool            `json:"sensitive"`
	Type      json.RawMessage `json:"type"`
	Value     json.RawMessage `json:"value"`
}

OutputMeta represents the JSON output of 'terraform output -json', which resembles state format version 3 due to a historical accident. Please see hashicorp/terraform/command/output.go. TODO KEM: Should this type be in terraform-json?

type OutputOption

type OutputOption interface {
	// contains filtered or unexported methods
}

type ParallelismOption

type ParallelismOption struct {
	// contains filtered or unexported fields
}

func Parallelism

func Parallelism(n int) *ParallelismOption

type PlanOption

type PlanOption interface {
	// contains filtered or unexported methods
}

type PluginDirOption

type PluginDirOption struct {
	// contains filtered or unexported fields
}

func PluginDir

func PluginDir(pluginDir string) *PluginDirOption

type ReconfigureOption

type ReconfigureOption struct {
	// contains filtered or unexported fields
}

func Reconfigure

func Reconfigure(reconfigure bool) *ReconfigureOption

type RefreshOption

type RefreshOption struct {
	// contains filtered or unexported fields
}

func Refresh

func Refresh(refresh bool) *RefreshOption

type StateOption

type StateOption struct {
	// contains filtered or unexported fields
}

func State

func State(path string) *StateOption

type StateOutOption

type StateOutOption struct {
	// contains filtered or unexported fields
}

func StateOut

func StateOut(path string) *StateOutOption

type TargetOption

type TargetOption struct {
	// contains filtered or unexported fields
}

func Target

func Target(resource string) *TargetOption

type Terraform

type Terraform struct {
	// contains filtered or unexported fields
}

func NewTerraform

func NewTerraform(workingDir string, execPath string) (*Terraform, error)

NewTerraform returns a Terraform struct with default values for all fields. If a blank execPath is supplied, NewTerraform will attempt to locate an appropriate binary on the system PATH.

func (*Terraform) Apply

func (tf *Terraform) Apply(ctx context.Context, opts ...ApplyOption) error

func (*Terraform) ApplyCmd

func (tf *Terraform) ApplyCmd(ctx context.Context, opts ...ApplyOption) *exec.Cmd

func (*Terraform) Destroy

func (tf *Terraform) Destroy(ctx context.Context, opts ...DestroyOption) error

func (*Terraform) DestroyCmd

func (tf *Terraform) DestroyCmd(ctx context.Context, opts ...DestroyOption) *exec.Cmd

func (*Terraform) Import added in v0.2.0

func (t *Terraform) Import(ctx context.Context, opts ...ImportOption) error

func (*Terraform) ImportCmd

func (tf *Terraform) ImportCmd(ctx context.Context, opts ...ImportOption) *exec.Cmd

func (*Terraform) Init

func (t *Terraform) Init(ctx context.Context, opts ...InitOption) error

func (*Terraform) InitCmd

func (tf *Terraform) InitCmd(ctx context.Context, opts ...InitOption) *exec.Cmd

func (*Terraform) Output

func (tf *Terraform) Output(ctx context.Context, opts ...OutputOption) (map[string]OutputMeta, error)

func (*Terraform) OutputCmd

func (tf *Terraform) OutputCmd(ctx context.Context, opts ...OutputOption) *exec.Cmd

func (*Terraform) Plan

func (tf *Terraform) Plan(ctx context.Context, opts ...PlanOption) error

func (*Terraform) PlanCmd

func (tf *Terraform) PlanCmd(ctx context.Context, opts ...PlanOption) *exec.Cmd

func (*Terraform) ProvidersSchema

func (tf *Terraform) ProvidersSchema(ctx context.Context) (*tfjson.ProviderSchemas, error)

func (*Terraform) ProvidersSchemaCmd

func (tf *Terraform) ProvidersSchemaCmd(ctx context.Context, args ...string) *exec.Cmd

func (*Terraform) SetEnv

func (tf *Terraform) SetEnv(env map[string]string)

func (*Terraform) SetLogger

func (tf *Terraform) SetLogger(logger *log.Logger)

func (*Terraform) StateShow

func (tf *Terraform) StateShow(ctx context.Context) (*tfjson.State, error)

func (*Terraform) StateShowCmd

func (tf *Terraform) StateShowCmd(ctx context.Context, args ...string) *exec.Cmd

type UpgradeOption

type UpgradeOption struct {
	// contains filtered or unexported fields
}

func Upgrade

func Upgrade(upgrade bool) *UpgradeOption

type VarFileOption

type VarFileOption struct {
	// contains filtered or unexported fields
}

func VarFile

func VarFile(path string) *VarFileOption

type VarOption

type VarOption struct {
	// contains filtered or unexported fields
}

func Var

func Var(assignment string) *VarOption

type VerifyPluginsOption

type VerifyPluginsOption struct {
	// contains filtered or unexported fields
}

func VerifyPlugins

func VerifyPlugins(verifyPlugins bool) *VerifyPluginsOption

Jump to

Keyboard shortcuts

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