diff --git a/pkg/backend/httpstate/backend.go b/pkg/backend/httpstate/backend.go index 99e22e75e..9eae00532 100644 --- a/pkg/backend/httpstate/backend.go +++ b/pkg/backend/httpstate/backend.go @@ -709,7 +709,7 @@ func (b *cloudBackend) CreateStack( // A 409 error response is returned when per-stack organizations are over their limit, // so we need to look at the message to differentiate. if strings.Contains(errResp.Message, "already exists") { - return nil, &backend.StackAlreadyExistsError{StackName: stackID.Stack} + return nil, &backend.StackAlreadyExistsError{StackName: stackID.String()} } if strings.Contains(errResp.Message, "you are using") { return nil, &backend.OverStackLimitError{Message: errResp.Message} diff --git a/pkg/backend/httpstate/client/api.go b/pkg/backend/httpstate/client/api.go index 8b8aea05a..905912e3f 100644 --- a/pkg/backend/httpstate/client/api.go +++ b/pkg/backend/httpstate/client/api.go @@ -53,6 +53,10 @@ type StackIdentifier struct { Stack string } +func (s StackIdentifier) String() string { + return fmt.Sprintf("%s/%s/%s", s.Owner, s.Project, s.Stack) +} + // UpdateIdentifier is the set of data needed to identify an update to a Pulumi Cloud stack. type UpdateIdentifier struct { StackIdentifier