better errors from terraform output when cloud is configured

This commit is contained in:
Brandon Croft 2022-04-04 13:39:27 -06:00
parent c33c8b013f
commit e794efc31e
No known key found for this signature in database
GPG Key ID: B01E32423322EB9D
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ func (s *State) GetRootOutputValues() (map[string]*states.OutputValue, error) {
so, err := s.Client.client.StateVersionOutputs.ReadCurrent(ctx, s.Client.workspace.ID)
if err != nil {
return nil, fmt.Errorf("Could not read state version outputs: %w", err)
return nil, fmt.Errorf("could not read state version outputs: %w", err)
}
result := make(map[string]*states.OutputValue)

View File

@ -19,7 +19,7 @@ import (
// so when accessing a State object concurrently it is the caller's
// responsibility to ensure that only one write is in progress at a time
// and that reads only occur when no write is in progress. The most common
// way to acheive this is to wrap the State in a SyncState and use the
// way to achieve this is to wrap the State in a SyncState and use the
// higher-level atomic operations supported by that type.
type State struct {
// Modules contains the state for each module. The keys in this map are
@ -412,7 +412,7 @@ func (s *State) MoveAbsResource(src, dst addrs.AbsResource) {
// MaybeMoveAbsResource moves the given src AbsResource's current state to the
// new dst address. This function will succeed if both the src address does not
// exist in state and the dst address does; the return value indicates whether
// or not the move occured. This function will panic if either the src does not
// or not the move occurred. This function will panic if either the src does not
// exist or the dst does exist (but not both).
func (s *State) MaybeMoveAbsResource(src, dst addrs.AbsResource) bool {
// Get the source and destinatation addresses from state.