-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
When trying to use ibmcloud terraform/cli to provision a project instance, we get the error Service 'project' was not found. This is because in the globalcatalog response for searching project, it finds the service but the kind is platform_service which does not pass isService:
| if e.Kind == "service" || e.Kind == "iaas" || e.Kind == "composite" { |
The service when debugging:
ID = "5e3a7a60-ecb1-11ec-ba3d-5596cf8703a4"
Name = "project"
CatalogCRN = "crn:v1:bluemix:public:globalcatalog::::platform_service:5e3a7a60-ecb1-11ec-ba3d-5596cf8703a4"
URL = "https://globalcatalog.cloud.ibm.com/api/v1/5e3a7a60-ecb1-11ec-ba3d-5596cf8703a4?languages=en"
Kind = "platform_service"
Metadata = models.ServiceMetadata(*github.com/IBM-Cloud/bluemix-go/models.PlatformServiceResourceMetadata) *{}
Children = []models.Service len: 0, cap: 0, nil
Active = true
Testing code:
package main
import (
"fmt"
"os"
"github.com/IBM-Cloud/bluemix-go"
"github.com/IBM-Cloud/bluemix-go/api/resource/resourcev1/catalog"
"github.com/IBM-Cloud/bluemix-go/session"
)
func main() {
session, err := session.New(&bluemix.Config{
BluemixAPIKey: os.Getenv("IBMCLOUD_API_KEY"),
Region: "us-east",
})
if err != nil {
panic(err)
}
client, err := catalog.New(session)
if err != nil {
panic(err)
}
services, err := client.ResourceCatalog().FindByName("project", false)
if err != nil {
panic(err)
}
fmt.Println(services)
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels