mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 08:21:07 -06:00
backend: Operation.Environment renamed to "Workspace"
This is part of an effort to switch this terminology across all of Terraform.
This commit is contained in:
parent
5a57962a32
commit
f7ce6a15f8
@ -136,8 +136,9 @@ type Operation struct {
|
||||
// The duration to retry obtaining a State lock.
|
||||
StateLockTimeout time.Duration
|
||||
|
||||
// Environment is the named state that should be loaded from the Backend.
|
||||
Environment string
|
||||
// Workspace is the name of the workspace that this operation should run
|
||||
// in, which controls which named state is used.
|
||||
Workspace string
|
||||
}
|
||||
|
||||
// RunningOperation is the result of starting an operation.
|
||||
|
@ -23,7 +23,7 @@ func (b *Local) Context(op *backend.Operation) (*terraform.Context, state.State,
|
||||
|
||||
func (b *Local) context(op *backend.Operation) (*terraform.Context, state.State, error) {
|
||||
// Get the state.
|
||||
s, err := b.State(op.Environment)
|
||||
s, err := b.State(op.Workspace)
|
||||
if err != nil {
|
||||
return nil, nil, errwrap.Wrapf("Error loading state: {{err}}", err)
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ func (m *Meta) Operation() *backend.Operation {
|
||||
PlanOutBackend: m.backendState,
|
||||
Targets: m.targets,
|
||||
UIIn: m.UIInput(),
|
||||
Environment: m.Workspace(),
|
||||
Workspace: m.Workspace(),
|
||||
LockState: m.stateLock,
|
||||
StateLockTimeout: m.stateLockTimeout,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user