gcloud command to create Firestore database is incorrect
bgood opened this issue · 1 comments
bgood commented
In the latest version of gcloud the command to create a Firestore database now uses --location
instead of --region
bgood commented
It is also worth noting that the default database created, is in Datastore Mode resulting in errors like.
Error: 9 FAILED_PRECONDITION: The Cloud Firestore API is not available for Firestore in Datastore Mode database projects/<redacted>/databases/(default).
at Object.callErrorFromStatus (/workspace/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client.js:352:49)
at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
at process.nextTick (/workspace/node_modules/@grpc/grpc-js/build/src/call-stream.js:188:78)
at process._tickCallback (internal/process/next_tick.js:61:11)
for call at
at ServiceClientImpl.makeServerStreamRequest (/workspace/node_modules/@grpc/grpc-js/build/src/client.js:336:30)
at ServiceClientImpl.<anonymous> (/workspace/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
at args (/workspace/node_modules/@google-cloud/firestore/build/src/v1/firestore_client.js:205:29)
at /workspace/node_modules/google-gax/build/src/streamingCalls/streamingApiCaller.js:38:28
at /workspace/node_modules/google-gax/build/src/normalCalls/timeout.js:44:16
at Object.request (/workspace/node_modules/google-gax/build/src/streamingCalls/streaming.js:126:40)
at makeRequest (/workspace/node_modules/retry-request/index.js:139:28)
at retryRequest (/workspace/node_modules/retry-request/index.js:107:5)
at StreamProxy.setStream (/workspace/node_modules/google-gax/build/src/streamingCalls/streaming.js:117:37)
at StreamingApiCaller.call (/workspace/node_modules/google-gax/build/src/streamingCalls/streamingApiCaller.js:54:16)
Caused by: Error
at Firestore.getAll (/workspace/node_modules/@google-cloud/firestore/build/src/index.js:902:23)
at DocumentReference.get (/workspace/node_modules/@google-cloud/firestore/build/src/reference.js:211:32)
at StateFirestore.get (/workspace/state.js:224:38)
at State.get (/workspace/state.js:50:29)
at processScalingRequest (/workspace/index.js:149:51)
at exports.scaleSpannerInstancePubSub (/workspace/index.js:170:11)
at Promise.resolve.then (/workspace/node_modules/@google-cloud/functions-framework/build/src/function_wrappers.js:141:25)
at process._tickCallback (internal/process/next_tick.js:68:7)