googlearchive / k8s-service-catalog

[DEPRECATED] Commandline tool to manage Service Catalog lifecycle and GCP Service Broker atop Kubernetes Cluster
Apache License 2.0
69 stars 31 forks source link

permit specifying GCP project with add-gcp-broker #206

Open DazWilkin opened 6 years ago

DazWilkin commented 6 years ago

sc add-gcp-broker assumes a GCP Project ID is set within gcloud config.

It does not provide a mechanism to specify a GCP project. I think it should.

I prefer this specificity when running commands to ensure I'm making changes to the correct (of many) projects.

sc add-gcp-broker
using project:  
Failed to configure the Service Broker
Error: error enabling APIs. To make sure all APIs are correctly enabled, use links below:
   servicebroker.googleapis.com: .../library/servicebroker.googleapis.com/?project=
   bigquery-json.googleapis.com: .../library/bigquery-json.googleapis.com/?project=
   bigtableadmin.googleapis.com: .../library/bigtableadmin.googleapis.com/?project=
   ml.googleapis.com: .../library/ml.googleapis.com/?project=
   pubsub.googleapis.com: .../library/pubsub.googleapis.com/?project=
   spanner.googleapis.com: .../library/spanner.googleapis.com/?project=
   sqladmin.googleapis.com: .../library/sqladmin.googleapis.com/?project=
   storage-api.googleapis.com: .../library/storage-api.googleapis.com/?project=

Requires

gcloud config set project ${PROJECT}

Recommend (something similar to):

sc add-gcp-broker --gcp-project-id=${PROJECT}