terraform

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackendS3 = "S3"
)

Variables

This section is empty.

Functions

func Apply

func Apply(workDirectory string, config *Config) (string, error)

func Destroy

func Destroy(workDirectory string, config *Config) (string, error)

func Output

func Output(workDirectory string, config *Config, outputVars []string) (map[string]string, error)

Types

type BackendOptions

type BackendOptions struct {
	S3 *BackendOptionsS3
}

func BackendFlags

func BackendFlags(backend *string) (cli.Flag, *BackendOptions)

func (*BackendOptions) AsFlags

func (o *BackendOptions) AsFlags() []string

type BackendOptionsS3

type BackendOptionsS3 struct {
	Bucket string
}

func BackendS3Flags

func BackendS3Flags() (cli.Flags, *BackendOptionsS3)

func (*BackendOptionsS3) AsFlags

func (o *BackendOptionsS3) AsFlags() []string

type Config

type Config struct {
	Backend  interface{}
	Provider interface{}
	Modules  map[string]interface{}
	Output   map[string]ConfigOutput
}

func (Config) MarshalJSON

func (c Config) MarshalJSON() ([]byte, error)

type ConfigOutput

type ConfigOutput struct {
	Value string `json:"value"`
}

type ExecContext

type ExecContext struct {
	*executil.Context
}

func NewTerrafromExecContext

func NewTerrafromExecContext(workingDir string, envVars map[string]string) (*ExecContext, error)

func (*ExecContext) Apply

func (tec *ExecContext) Apply(vars map[string]string) (*executil.Result, string, error)

func (*ExecContext) Destroy

func (tec *ExecContext) Destroy(vars map[string]string) (*executil.Result, string, error)

func (*ExecContext) Init

func (tec *ExecContext) Init() (*executil.Result, string, error)

func (ExecContext) Output

func (tec ExecContext) Output(outputVar string) (string, error)

func (ExecContext) Outputs

func (tec ExecContext) Outputs(outputVars []string) (map[string]string, error)

func (*ExecContext) Plan

func (tec *ExecContext) Plan(vars map[string]string, destroy bool) (*executil.Result, string, error)

type PlanResult

type PlanResult int32
const (
	PlanResultEmpty PlanResult = iota
	PlanResultNotEmpty
	PlanResultError
)

func Plan

func Plan(workDirectory string, config *Config, destroy bool) (PlanResult, string, error)

type S3BackendConfig

type S3BackendConfig struct {
	Region  string
	Bucket  string
	Key     string
	Encrypt bool
}

func (S3BackendConfig) MarshalJSON

func (b S3BackendConfig) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

Directories

Path Synopsis
provider
aws

Jump to

Keyboard shortcuts

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