Documentation ¶
Index ¶
- type Colorer
- type Colorize
- type Remote
- func (b *Remote) CLIInit(opts *backend.CLIOpts) error
- func (b *Remote) Colorize() Colorer
- func (b *Remote) ConfigSchema() *configschema.Block
- func (b *Remote) Configure(obj cty.Value) tfdiags.Diagnostics
- func (b *Remote) DeleteWorkspace(name string) error
- func (b *Remote) IgnoreVersionConflict()
- func (b *Remote) IsLocalOperations() bool
- func (b *Remote) LocalRun(op *backend.Operation) (*backend.LocalRun, statemgr.Full, tfdiags.Diagnostics)
- func (b *Remote) Operation(ctx context.Context, op *backend.Operation) (*backend.RunningOperation, error)
- func (b *Remote) PrepareConfig(obj cty.Value) (cty.Value, tfdiags.Diagnostics)
- func (b *Remote) StateMgr(name string) (statemgr.Full, error)
- func (b *Remote) VerifyWorkspaceTerraformVersion(workspaceName string) tfdiags.Diagnostics
- func (b *Remote) WorkspaceNamePattern() string
- func (b *Remote) Workspaces() ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Colorize ¶
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) ConfigSchema ¶
func (b *Remote) ConfigSchema() *configschema.Block
ConfigSchema implements backend.Enhanced.
func (*Remote) Configure ¶
func (b *Remote) Configure(obj cty.Value) tfdiags.Diagnostics
Configure implements backend.Enhanced.
func (*Remote) DeleteWorkspace ¶
DeleteWorkspace implements backend.Enhanced.
func (*Remote) IgnoreVersionConflict ¶
func (b *Remote) IgnoreVersionConflict()
IgnoreVersionConflict allows commands to disable the fall-back check that the local Terraform version matches the remote workspace's configured Terraform version. This should be called by commands where this check is unnecessary, such as those performing remote operations, or read-only operations. It will also be called if the user uses a command-line flag to override this check.
func (*Remote) IsLocalOperations ¶
func (*Remote) LocalRun ¶ added in v1.1.0
func (b *Remote) LocalRun(op *backend.Operation) (*backend.LocalRun, statemgr.Full, tfdiags.Diagnostics)
Context implements backend.Local.
func (*Remote) Operation ¶
func (b *Remote) Operation(ctx context.Context, op *backend.Operation) (*backend.RunningOperation, error)
Operation implements backend.Enhanced.
func (*Remote) PrepareConfig ¶
PrepareConfig implements backend.Backend.
func (*Remote) VerifyWorkspaceTerraformVersion ¶
func (b *Remote) VerifyWorkspaceTerraformVersion(workspaceName string) tfdiags.Diagnostics
VerifyWorkspaceTerraformVersion compares the local Terraform version against the workspace's configured Terraform version. If they are equal, this means that there are no compatibility concerns, so it returns no diagnostics.
If the versions differ,
func (*Remote) WorkspaceNamePattern ¶ added in v1.1.0
WorkspaceNamePattern provides an appropriate workspace renaming pattern for backend migration purposes (handled outside of this package), based on previous usage of this backend with the 'prefix' workspace functionality. As of this writing, see meta_backend.migrate.go
func (*Remote) Workspaces ¶
Workspaces implements backend.Enhanced.