mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
update remote-state.Backend
This commit is contained in:
parent
5762878eba
commit
8fdf3a42b8
@ -47,20 +47,24 @@ func (b *Backend) Configure(rc *terraform.ResourceConfig) error {
|
|||||||
return b.Backend.Configure(rc)
|
return b.Backend.Configure(rc)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *Backend) States() ([]string, string, error) {
|
func (b *Backend) States() ([]string, error) {
|
||||||
return []string{backend.DefaultStateName}, backend.DefaultStateName, nil
|
return nil, backend.ErrNamedStatesNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *Backend) ChangeState(name string) error {
|
func (b *Backend) DeleteState(name string) error {
|
||||||
return nil
|
return backend.ErrNamedStatesNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *Backend) State() (state.State, error) {
|
func (b *Backend) State(name string) (state.State, error) {
|
||||||
// This shouldn't happen
|
// This shouldn't happen
|
||||||
if b.client == nil {
|
if b.client == nil {
|
||||||
panic("nil remote client")
|
panic("nil remote client")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if name != backend.DefaultStateName {
|
||||||
|
return nil, backend.ErrNamedStatesNotSupported
|
||||||
|
}
|
||||||
|
|
||||||
s := &remote.State{Client: b.client}
|
s := &remote.State{Client: b.client}
|
||||||
return s, nil
|
return s, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user