terraform

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const AppName = "app"

Variables

This section is empty.

Functions

func FreshOutput

func FreshOutput(remoteState *RemoteState, rootPath string) (map[string]string, error)

func FreshShow

func FreshShow(remoteState *RemoteState, rootPath string) (string, error)

func GenerateBackendConfig

func GenerateBackendConfig(remoteState *RemoteState, rootPath string) (string, error)

func Get

func Get(rootPath string) error

func GetBackendConfigFilename

func GetBackendConfigFilename(rootPath string) string

func IsStateEmpty

func IsStateEmpty(rootPath string) (bool, error)

func Output

func Output(rootPath string) (map[string]string, error)

func ReenableRemoteState

func ReenableRemoteState(remoteState *RemoteState, rootPath string) (string, error)

func Show

func Show(rootPath string) (string, error)

Types

type ApplyInput

type ApplyInput struct {
	StdoutWriter io.Writer
	StderrWriter io.Writer
	RootPath     string
	Target       string
	Refresh      bool
	Variables    map[string]string
	PlanFilePath string
	XLegacy      bool
}

type ApplyOutput

type ApplyOutput struct {
	ExitCode int
	Stdout   string
	Stderr   string
	Warnings []string
	Outputs  map[string]string
	Diff     *ResourceDiff
}

func Apply

func Apply(input *ApplyInput) (*ApplyOutput, error)

func FreshApply

func FreshApply(input *FreshApplyInput) (*ApplyOutput, error)

type BackendConfig

type BackendConfig struct {
	Terraform []BackendObj `json:"terraform"`
}

type BackendObj

type BackendObj struct {
	Backend []S3Backend `json:"backend"`
}

type CmdOutput

type CmdOutput struct {
	Stdout   string
	Stderr   string
	ExitCode int
	Warnings []string
}

func Cmd

func Cmd(cmdName string, args []string, basePath string, stdoutW, stderrW io.Writer) (*CmdOutput, error)

func Validate

func Validate(rootpath string) (*CmdOutput, error)

type DestroyInput

type DestroyInput struct {
	StdoutWriter io.Writer
	StderrWriter io.Writer
	RootPath     string
	Refresh      bool
	Target       string
	Variables    map[string]string
	XLegacy      bool
}

type DestroyOutput

type DestroyOutput struct {
	ExitCode int
	Stdout   string
	Stderr   string
	Warnings []string
	Diff     *ResourceDiff
}

func Destroy

func Destroy(input *DestroyInput) (*DestroyOutput, error)

func FreshDestroy

func FreshDestroy(input *FreshDestroyInput) (*DestroyOutput, error)

type FreshApplyInput

type FreshApplyInput struct {
	RemoteState  *RemoteState
	StdoutWriter io.Writer
	StderrWriter io.Writer
	RootPath     string
	Target       string
	Refresh      bool
	PlanFilePath string
	XLegacy      bool
}

type FreshDestroyInput

type FreshDestroyInput struct {
	RemoteState  *RemoteState
	StdoutWriter io.Writer
	StderrWriter io.Writer
	RootPath     string
	Refresh      bool
	Target       string
	Variables    map[string]string
	XLegacy      bool
}

type FreshPlanInput

type FreshPlanInput struct {
	RemoteState  *RemoteState
	StdoutWriter io.Writer
	StderrWriter io.Writer
	RootPath     string
	PlanFilePath string
	Variables    map[string]string
	Refresh      bool
	Target       string
	Destroy      bool
	XLegacy      bool
}

type PlanInput

type PlanInput struct {
	StdoutWriter io.Writer
	StderrWriter io.Writer
	RootPath     string
	PlanFilePath string
	Variables    map[string]string
	Refresh      bool
	Target       string
	Destroy      bool
	XLegacy      bool
}

type PlanOutput

type PlanOutput struct {
	ExitCode int
	Stdout   string
	Stderr   string
	Warnings []string
	Diff     *PlanResourceDiff
}

func FreshPlan

func FreshPlan(input *FreshPlanInput) (*PlanOutput, error)

func Plan

func Plan(input *PlanInput) (*PlanOutput, error)

type PlanResourceDiff

type PlanResourceDiff struct {
	ToCreate int
	ToRemove int
	ToChange int
}

type RemoteState

type RemoteState struct {
	Backend string
	Config  map[string]string
}

func GetRemoteStateForApp

func GetRemoteStateForApp(rs *RemoteState, namespace, appName string) (*RemoteState, error)

func GetRemoteStateForSlotId

func GetRemoteStateForSlotId(rs *RemoteState, namespace, appName, slotId string) (*RemoteState, error)

type ResourceDiff

type ResourceDiff struct {
	Created int
	Removed int
	Changed int
}

type S3Backend

type S3Backend struct {
	S3 map[string]string `json:"s3"`
}

Jump to

Keyboard shortcuts

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