0
votes

Each dev on our team is setting up a Firebase project to work with 'locally'. Due to the outbound requests restriction on the free tier, the implication here is that non-Google services that are being called from our functions, cannot actually be called to validate the function works as expected.

Right now the best I can come up with is determining which environment a cloud function is running in (e.g. local, master, prod, etc.) and, if not on a paid tier, fake the outbound service response.

Is there a better way to do this? Ideally we would like to be able to have a fully functional cloud function for each dev.

1
Have you tried to calculate the actual cost of a dev project on Blaze? Unless you're heavily loading it with data and traffic, it will cost extremely little. Paying that small amount of money to help your development might be worth the hassle of coming up with some workaround.Doug Stevenson
Have you tried to calculate the actual cost of the project in the Blaze plan? It's probably not as much as you'd think for a small dev project. firebase.google.com/pricingDoug Stevenson
@DougStevenson Yes, it would be one blaze plan cost per dev ($25 per dev), as they would be using their own project.skwny
You're mixing up Flame and Blaze. The Flame plan is a flat $25/month. The Blaze plan is pay-as-you-go, and you're only billed for what you use. Chances are extremely good that a single developer on a Blaze project may only cost a couple dollars a month (or less!), based on usage. Those couple of dollars probably cost less than the time it would take to work around the lack of outgoing connection.Doug Stevenson
@DougStevenson You are right, I did confuse the two. Also, I don't know why, but I was imagining Blaze was an enterprise type of pricing plan that was for accounts that need more than the Flame plan. Blaze will certainly be negligible on a local dev environment. Thanks for the assist - my life suddenly got easier!skwny

1 Answers

1
votes

As you said faking the 3rd party service is one solution.

Another could be using Google's 12 month 300$ credit at https://cloud.google.com/free/

That makes it possible for you to have a single Google account with 300$ credits, then you can change your Firebase free plans into Blaze.

If needed, you can also set up budget alerts which notifies you when you spend a certain amount of credit.