Documentation ¶
Index ¶
- Constants
- func BoolPtr(a bool) *bool
- func FalsePtr() *bool
- func IntPtr(a int) *int
- func StringMapPtr(a map[string]string) *map[string]string
- func StringPtr(a string) *string
- func StringSlice(a []*string) (o []string)
- func TruePtr() *bool
- type OutputLog
- func (ol *OutputLog) Append(ole *OutputLogEntry) *OutputLogEntry
- func (ol *OutputLog) Error(err error) *OutputLogEntry
- func (ol *OutputLog) Stderr(message string) *OutputLogEntry
- func (ol *OutputLog) StderrWithTags(message string, tags []string) *OutputLogEntry
- func (ol *OutputLog) Stdout(message string) *OutputLogEntry
- func (ol *OutputLog) StdoutWithTags(message string, tags []string) *OutputLogEntry
- func (ol *OutputLog) String() (output string)
- type OutputLogEntry
- type TerraformAction
- type TerraformActionParams
- type TerraformCli
- func (t *TerraformCli) Apply() *TerraformAction
- func (t *TerraformCli) Get(params *TerraformGetParams) *TerraformAction
- func (t *TerraformCli) Init(params *TerraformInitParams) *TerraformAction
- func (t *TerraformCli) Plan(params *TerraformPlanParams) *TerraformAction
- func (client *TerraformCli) WithWorkingDirectory(workingDirectory string) *TerraformCli
- type TerraformGetParams
- type TerraformInitParams
- type TerraformOutput
- type TerraformPlanParams
Constants ¶
View Source
const ( STDERR = "stderr" STDOUT = "stdout" )
Variables ¶
This section is empty.
Functions ¶
func StringSlice ¶
Types ¶
type OutputLog ¶
type OutputLog struct {
Entries []*OutputLogEntry `json:"entries"`
}
func NewOutputLogs ¶
func NewOutputLogs() *OutputLog
func (*OutputLog) Append ¶
func (ol *OutputLog) Append(ole *OutputLogEntry) *OutputLogEntry
func (*OutputLog) Error ¶
func (ol *OutputLog) Error(err error) *OutputLogEntry
func (*OutputLog) Stderr ¶
func (ol *OutputLog) Stderr(message string) *OutputLogEntry
func (*OutputLog) StderrWithTags ¶
func (ol *OutputLog) StderrWithTags(message string, tags []string) *OutputLogEntry
func (*OutputLog) Stdout ¶
func (ol *OutputLog) Stdout(message string) *OutputLogEntry
func (*OutputLog) StdoutWithTags ¶
func (ol *OutputLog) StdoutWithTags(message string, tags []string) *OutputLogEntry
type OutputLogEntry ¶
type OutputLogEntry struct { Type string `json:"type"` Content string `json:"content"` Tags []string `json:"prefix"` }
func (*OutputLogEntry) String ¶
func (ole *OutputLogEntry) String() string
type TerraformAction ¶
func (*TerraformAction) InitLogger ¶
func (a *TerraformAction) InitLogger(log *OutputLog) (err error)
func (*TerraformAction) Initialise ¶
func (a *TerraformAction) Initialise() *TerraformAction
type TerraformActionParams ¶
type TerraformCli ¶
type TerraformCli struct {
// contains filtered or unexported fields
}
func NewTerraformClient ¶
func NewTerraformClient() *TerraformCli
NewTerraformClient return a struct which behaves like the cli terraform client.
Between the unreliability of the internal interfaces in the terraform library and then need to communicate with providers, we'll wrap the terraform command in bash, rather than importing the `github.com/hashicorp/terraform` library and calling methods directly. See https://github.com/hashicorp/terraform/issues/12582 for more info.
func NewTerraformClientWithBinPath ¶
func NewTerraformClientWithBinPath(binPath string) *TerraformCli
func (*TerraformCli) Apply ¶
func (t *TerraformCli) Apply() *TerraformAction
func (*TerraformCli) Get ¶
func (t *TerraformCli) Get(params *TerraformGetParams) *TerraformAction
func (*TerraformCli) Init ¶
func (t *TerraformCli) Init(params *TerraformInitParams) *TerraformAction
func (*TerraformCli) Plan ¶
func (t *TerraformCli) Plan(params *TerraformPlanParams) *TerraformAction
func (*TerraformCli) WithWorkingDirectory ¶
func (client *TerraformCli) WithWorkingDirectory(workingDirectory string) *TerraformCli
type TerraformGetParams ¶
type TerraformGetParams struct {
Directory string
}
func (TerraformGetParams) Opts ¶
func (t TerraformGetParams) Opts() map[string][]string
func (TerraformGetParams) OptsString ¶
func (t TerraformGetParams) OptsString() string
func (TerraformGetParams) OptsStringSlice ¶
func (t TerraformGetParams) OptsStringSlice() []string
type TerraformInitParams ¶
type TerraformInitParams struct { Backend *bool BackendConfig string ForceCopy bool FromModule string Get *bool GetPlugins *bool Input *bool Lock *bool LockTimeout int NoColor bool PluginDir string Reconfigure bool Upgrade *bool VerifyPlugins *bool }
func NewTerraformInitParams ¶
func NewTerraformInitParams() *TerraformInitParams
func (*TerraformInitParams) Opts ¶
func (p *TerraformInitParams) Opts() map[string][]string
func (*TerraformInitParams) OptsString ¶
func (p *TerraformInitParams) OptsString() string
func (*TerraformInitParams) OptsStringSlice ¶
func (p *TerraformInitParams) OptsStringSlice() []string
type TerraformOutput ¶
type TerraformOutput struct { Stderr io.ReadCloser Stdout io.ReadCloser }
type TerraformPlanParams ¶
type TerraformPlanParams struct { Destroy bool DetailedExitcode bool Input *bool Lock *bool LockTimeout int NoColor bool ModuleDepth *int Out *string Parallelism *int Refresh *bool State *string Target []*string Var map[string]string VarFile []*string }
func NewTerraformPlanParams ¶
func NewTerraformPlanParams() *TerraformPlanParams
func (*TerraformPlanParams) Opts ¶
func (p *TerraformPlanParams) Opts() map[string][]string
func (*TerraformPlanParams) OptsString ¶
func (p *TerraformPlanParams) OptsString() string
func (*TerraformPlanParams) OptsStringSlice ¶
func (p *TerraformPlanParams) OptsStringSlice() []string
Click to show internal directories.
Click to hide internal directories.