Skip to content

Commit

Permalink
Fix refresh for org tokens with slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
seanyeh committed Sep 22, 2024
1 parent 94db6e3 commit e1c36c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions provider/pkg/provider/org_access_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ func (ot *PulumiServiceOrgAccessTokenResource) deleteOrgAccessToken(ctx context.
func splitOrgAccessTokenId(id string) (string, string, string, error) {
// format: organization/name/tokenId
s := strings.Split(id, "/")
if len(s) != 3 {
if len(s) < 3 {
return "", "", "", fmt.Errorf("%q is invalid, must contain a single slash ('/')", id)
}
return s[0], s[1], s[2], nil
return s[0], s[1], strings.Join(s[2:], ""), nil
}

0 comments on commit e1c36c4

Please sign in to comment.