Demo, all content is generated
Question

firebase deploy says my project must be on the Blaze plan, I don't want a credit card surprise

Open · 561 views · asked by mateo_g · edited
Error: Your project must be on the Blaze (pay-as-you-go) plan to complete this command. Required API cloudbuild.googleapis.com can't be enabled until the upgrade is complete.

I only have one small function that sends a welcome email. Is there any way to deploy functions on the free plan? I'm a student and a bill of any size is a problem.

What I’ve tried

ChatGPT suggested downgrading firebase-functions to an old version. Didn't work, and I'm not sure it's a good idea anyway.

Comment

3 answers

sven_fire · edited

No, Cloud Functions need Blaze since 2020, regardless of version. But Blaze includes the same free quota (2 million invocations/month), so one welcome email function will cost €0 in practice.

To remove the fear:

  • Set a budget alert in Google Cloud Billing (e.g. €5). Note it alerts, it doesn't stop spending.
  • Set maxInstances: 1 on the function so a bug can't fan out.
  • Container images for functions are stored in Artifact Registry, and old ones can cost a few cents. Set a cleanup policy (firebase functions:artifacts:setpolicy).
Comment
ok maxInstances 1 and a budget of 2 euros. deployed, thanks mateo_g · edited
deploydan · edited

If you really want zero card on file: send the welcome email from somewhere else. Resend or a Vercel/Cloudflare free function called from your client after signup works fine for this. Less "Firebase native" but no billing account needed.

Comment
the budget alert only alerts? that's a bit scary mateo_g · edited
Yes. There's a documented way to auto-disable billing via a Pub/Sub function when the budget is hit, but for one function with maxInstances 1 I wouldn't bother. deploydan · edited
felix_codes · edited

Data point: I've been on Blaze for about a year with three small functions and a few hundred users. Every invoice has been €0.00 except one month of €0.03 for container storage. With a budget alert set you'll be fine.

Comment