Skip to content

Commit

Permalink
i/r/servicecat: Add provisioning artifact ID
Browse files Browse the repository at this point in the history
  • Loading branch information
YakDriver committed May 20, 2021
1 parent 69fb63f commit 1ae618b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 12 additions & 0 deletions aws/internal/service/servicecatalog/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,15 @@ func TagOptionResourceAssociationParseID(id string) (string, string, error) {
func TagOptionResourceAssociationID(tagOptionID, resourceID string) string {
return strings.Join([]string{tagOptionID, resourceID}, ":")
}

func ProvisioningArtifactID(artifactID, productID string) string {
return strings.Join([]string{artifactID, productID}, ":")
}

func ProvisioningArtifactParseID(id string) (string, string, error) {
parts := strings.Split(id, ":")
if len(parts) != 2 {
return "", "", fmt.Errorf("Please make sure the ID is in the form artifact_id:product_id (i.e. pa-r2d2slrtcob:prod-c3pohcrhmisy")
}
return parts[0], parts[1], nil
}
3 changes: 1 addition & 2 deletions aws/internal/service/servicecatalog/waiter/waiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ const (
StatusUnavailable = "UNAVAILABLE"

// AWS documentation is wrong, says that status will be "AVAILABLE" but it is actually "CREATED"
ProductStatusCreated = "CREATED"
StatusCreated = "CREATED"

OrganizationAccessStatusError = "ERROR"
StatusCreated = "CREATED"
)

func ProductReady(conn *servicecatalog.ServiceCatalog, acceptLanguage, productID string) (*servicecatalog.DescribeProductAsAdminOutput, error) {
Expand Down

0 comments on commit 1ae618b

Please sign in to comment.