Hello, I'm currently trying to deploy a test function for listening to a topic from pub/sub.
Here is the step I have done:
import { logger, pubsub } from "firebase-functions/v2";
exports.helloWorld = pubsub.onMessagePublished(
"subscription-listener",
(event) => {
logger.log("Event data: ", event.data.message);
}
);
When I tried to run `firebase deploy`, it gives me error below:
HTTP Error: 400, Could not create Cloud Run service helloworld. spec.template.spec.containers.resources.limits.cpu: Invalid value specified for cpu. For the specified value, maxScale may not exceed 10
Are there any other step that is required to be done to be able to deploy the code?
Hi @danhdao,
Welcome to the Google Cloud Community!
Try the following troubleshooting options:
Let me know if it helped, thanks!
exports.api = functionsV2.onRequest({cors: true, minInstances: 1, maxInstances: 10}, api);