update remote-state.Backend

This commit is contained in:
James Bardin 2017-02-27 16:56:55 -05:00
parent 5762878eba
commit 8fdf3a42b8

View File

@ -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
} }