How can I force the gcloud-node client to attempt to use the compute engine environment, which relies upon the "metadata service" for getting auth tokens?
I see this chunk of code in lib/storage/index.js, and I don't see where/how it is checking for the compute engine environment:
function Storage(config) {
if (!(this instanceof Storage)) {
return new Storage(config);
}
this.makeAuthorizedRequest_ = util.makeAuthorizedRequest({
credentials: config.credentials,
keyFile: config.keyFilename,
scopes: SCOPES
});
this.projectId = config.projectId;
}
Basically I'm attempting to create my client like this:
var gcloud = require('gcloud');
var storage = gcloud.storage();
And I'm hitting an error because I haven't passed a config object with credentials. The docs here made it seem like this was the expected syntax on compute engine however (i.e., gcloud.storage()).
Is this auth approach supported currently?
How can I force the gcloud-node client to attempt to use the compute engine environment, which relies upon the "metadata service" for getting auth tokens?
I see this chunk of code in lib/storage/index.js, and I don't see where/how it is checking for the compute engine environment:
Basically I'm attempting to create my client like this:
And I'm hitting an error because I haven't passed a config object with credentials. The docs here made it seem like this was the expected syntax on compute engine however (i.e.,
gcloud.storage()).Is this auth approach supported currently?