I'm unable to set the Project ID w/ Runtime Configuration v1beta1.
I'd prefer to use the new Cloud Client Library but Runtime Configuration API is not available.
'Google Cloud Runtime Configuration API has not been used in project usable-auth-library before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/runtimeconfig.googleapis.com/overview?project=usable-auth-library then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.'
It's unclear why the library is defaulting to 'usable-auth-library'.
The API is enabled in my project.
I'm gcloud auth application-default logged in.
It's unclear to me which signature I need for getApplicationDefault but I've tried with/out projectId:
google.auth.getApplicationDefault(function (err, authClient[, projectId]) {...}
With the projectId parameter, its value is undefined.
Without the parameter, the value of authClient.projectId is undefined
I appear unable to explicitly set project on the get method's options (Unknown name).
I appear unable to explicitly set GCLOUD_PROJECT
runtimeconfig.projects.configs.variables.get({
auth: authClient,
name: FQN
}, function(err, result){
console.log(err, result);
});
I'm using:
"googleapis": "^20.1.0"
I'm stumped. Please help. Thanks!
Instead of relying on gcloud auth application-default login (which uses a shared gcloud project for billing), try this:
GOOGLE_APPLICATION_CREDENTIALS environment variable to /path/to/your/keyfile.json.Let me know how that goes.
Aha! Of course! That worked!
I've encountered this problem before where services aren't enabled in the project associated with Application Default Credentials. I'm a Googler too. I'll ping the project owners.
Thank you @jmdobry
Most helpful comment
Aha! Of course! That worked!
I've encountered this problem before where services aren't enabled in the project associated with Application Default Credentials. I'm a Googler too. I'll ping the project owners.
Thank you @jmdobry