print full Pulumi Cloud stack name in errors for stack select
(#3933)
This commit is contained in:
parent
7c08ba4583
commit
77af9e0eac
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue