firebase / firebase/firebase-tools

Include spend caps prompt in `firebase init` for Functions and App Hosting

Open
#10,869 0 comments 0 reactions 0 assignees View on GitHub
type: feature request
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

Now that Cloud supports spend caps for specific products ([announcement](https://cloud.google.com/blog/topics/cost-management/new-early-anomalies-and-spend-caps-on-google-cloud-budgets), [docs](https://docs.cloud.google.com/billing/docs/how-to/budgets-spend-caps)), it would be great if the `firebase init functions` and `firebase init apphosting` commands prompted about setting up a spend cap.

The CLI could first check if a relevant spend cap is already set on the billing account. If it is, log that the spend cap exists and what its limit is. If it isn't, ideally start a flow to create a spend cap in the CLI.

As a short-term stopgap, `firebase init` could at least print a link to the spend cap docs.

Contributor guide

Open the contributing guide

Research direction

Start at the `firebase init functions` and `firebase init apphosting` entry points and trace how billing-related prompts are handled. Determine how the CLI can check for an existing spend cap and expose its limit, or provide the documented fallback link. Done means initialization offers the spend-cap flow or link and reports an existing cap when applicable.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, typescript
Domain
cli, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.