terraform

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	WorkingDir string
	Vars       []Var
	// contains filtered or unexported fields
}

func NewTerraformAction

func NewTerraformAction(dir string, vars []Var, opts ...Option) *Action

func (*Action) Apply

func (a *Action) Apply() error

func (*Action) Destroy

func (a *Action) Destroy() error

func (*Action) GetOutput

func (a *Action) GetOutput() (content []byte, err error)

func (*Action) Option

func (a *Action) Option(opt Option) *Action

func (*Action) RemoveDir

func (a *Action) RemoveDir() error

type EnvVar

type EnvVar map[string]string

func (EnvVar) Apply

func (v EnvVar) Apply(a *Action)

type Flags

type Flags string
const (
	OptionDisplayOutput   Flags = "display_output"
	OptionRequireApproval Flags = "require_approval"
)

func (Flags) Apply

func (f Flags) Apply(a *Action)

type Option

type Option interface {
	Apply(*Action)
}

type OutputContainer

type OutputContainer map[string]*OutputValue

func ParseOutput

func ParseOutput(data []byte) (oc *OutputContainer, err error)

func (OutputContainer) GetString

func (oc OutputContainer) GetString(key string) string

func (OutputContainer) ParseField

func (oc OutputContainer) ParseField(key string, target interface{}) error

type OutputValue

type OutputValue struct {
	Type  interface{} `json:"type"`
	Value interface{} `json:"value"`
}

type Values

type Values map[Var]interface{}

func (Values) Apply

func (v Values) Apply(a *Action)

type Var

type Var struct {
	Name         string
	CreationOnly bool
	TemplateOnly bool
}

Jump to

Keyboard shortcuts

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