Documentation
¶
Index ¶
- type Remote
- func (b *Remote) CLIInit(opts *backend.CLIOpts) error
- func (b *Remote) ConfigSchema() *configschema.Block
- func (b *Remote) Configure(ctx context.Context, obj cty.Value) tfdiags.Diagnostics
- func (b *Remote) DeleteWorkspace(_ context.Context, name string, _ bool) error
- func (b *Remote) IgnoreVersionConflict()
- func (b *Remote) IsLocalOperations() bool
- func (b *Remote) LocalRun(ctx context.Context, stopCtx context.Context, 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) ServiceDiscoveryAliases() ([]backend.HostAlias, error)
- func (b *Remote) StateMgr(ctx context.Context, name string) (statemgr.Full, error)
- func (b *Remote) VerifyWorkspaceTerraformVersion(workspaceName string) tfdiags.Diagnostics
- func (b *Remote) WorkspaceNamePattern() string
- func (b *Remote) Workspaces(context.Context) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Remote ¶
type Remote struct {
View views.BackendRemote
// ContextOpts are the base context options to set when initializing a
// new OpenTofu context. Many of these will be overridden or merged by
// Operation. See Operation for more details.
ContextOpts *tofu.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, enc encryption.StateEncryption) *Remote
New creates a new initialized remote backend.
func (*Remote) ConfigSchema ¶
func (b *Remote) ConfigSchema() *configschema.Block
ConfigSchema 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 OpenTofu version matches the remote workspace's configured OpenTofu 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 ¶
func (b *Remote) LocalRun(ctx context.Context, stopCtx context.Context, op *backend.Operation) (*backend.LocalRun, statemgr.Full, tfdiags.Diagnostics)
LocalRun implements backend.Local. Refer to the comments of backend.Local for more details about ctx vs stopCtx.
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) ServiceDiscoveryAliases ¶
func (*Remote) VerifyWorkspaceTerraformVersion ¶
func (b *Remote) VerifyWorkspaceTerraformVersion(workspaceName string) tfdiags.Diagnostics
VerifyWorkspaceTerraformVersion compares the local OpenTofu version against the workspace's configured OpenTofu 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 ¶
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