remote

package
v0.11.8 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: MPL-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Remote

type Remote struct {
	// CLI and Colorize control the CLI output. If CLI is nil then no CLI
	// output will be done. If CLIColor is nil then no coloring will be done.
	CLI      cli.Ui
	CLIColor *colorstring.Colorize

	// ContextOpts are the base context options to set when initializing a
	// new Terraform context. Many of these will be overridden or merged by
	// Operation. See Operation for more details.
	ContextOpts *terraform.ContextOpts
	// contains filtered or unexported fields
}

Remote is an implementation of EnhancedBackend that performs all operations in a remote backend.

func New

func New(services *disco.Disco) *Remote

New creates a new initialized remote backend.

func (*Remote) CLIInit

func (b *Remote) CLIInit(opts *backend.CLIOpts) error

CLIInit implements backend.CLI

func (*Remote) Colorize

func (b *Remote) Colorize() *colorstring.Colorize

Colorize returns the Colorize structure that can be used for colorizing output. This is gauranteed to always return a non-nil value and so is useful as a helper to wrap any potentially colored strings.

func (*Remote) Configure

func (b *Remote) Configure(c *terraform.ResourceConfig) error

Configure configures the backend itself with the configuration given.

func (*Remote) DeleteState

func (b *Remote) DeleteState(workspace string) error

DeleteState removes the remote workspace if it exists.

func (*Remote) Input

Input is called to ask the user for input for completing the configuration.

func (*Remote) Operation

func (b *Remote) Operation(ctx context.Context, op *backend.Operation) (*backend.RunningOperation, error)

Operation implements backend.Enhanced

func (*Remote) State

func (b *Remote) State(workspace string) (state.State, error)

State returns the latest state of the given remote workspace. The workspace will be created if it doesn't exist.

func (*Remote) States

func (b *Remote) States() ([]string, error)

States returns a filtered list of remote workspace names.

func (*Remote) Validate

func (b *Remote) Validate(c *terraform.ResourceConfig) ([]string, []error)

Validate is called once at the beginning with the raw configuration and can return a list of warnings and/or errors.

Jump to

Keyboard shortcuts

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