Documentation ¶
Index ¶
- type Colorer
- type Colorize
- type Remote
- func (b *Remote) CLIInit(opts *backend.CLIOpts) error
- func (b *Remote) Colorize() Colorer
- func (b *Remote) Configure(c *terraform.ResourceConfig) error
- func (b *Remote) DeleteState(workspace string) error
- func (b *Remote) Input(ui terraform.UIInput, c *terraform.ResourceConfig) (*terraform.ResourceConfig, error)
- func (b *Remote) Operation(ctx context.Context, op *backend.Operation) (*backend.RunningOperation, error)
- func (b *Remote) State(workspace string) (state.State, error)
- func (b *Remote) States() ([]string, error)
- func (b *Remote) Validate(c *terraform.ResourceConfig) ([]string, []error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Colorer ¶ added in v0.11.9
Colorer is the interface that must be implemented to colorize strings.
type Colorize ¶ added in v0.11.9
type Colorize struct {
// contains filtered or unexported fields
}
Colorize is used to print output when the -no-color flag is used. It will strip all ANSI escaped color codes which are set while the operation was executed in Terraform Enterprise.
When Terraform Enterprise supports run specific variables, this code can be removed as we can then pass the CLI flag to the backend and prevent the color codes from being written to the output.
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 (*Remote) Colorize ¶
Colorize returns the Colorize structure that can be used for colorizing output. This is guaranteed 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 ¶
DeleteState removes the remote workspace if it exists.
func (*Remote) Input ¶
func (b *Remote) Input(ui terraform.UIInput, c *terraform.ResourceConfig) (*terraform.ResourceConfig, error)
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 ¶
State returns the latest state of the given remote workspace. The workspace will be created if it doesn't exist.