Stop Firebase spending at the budget you set.
When your project's cost reaches a budget threshold you define, Auto Stop Services removes the billing account, which suspends paid services. Cloud billing alerts notify you but take no action on their own. Your data is preserved, and you restore service by reconnecting billing.
The flow.
You set a dollar budget and a stop threshold (default 100%). Google Cloud tracks the spend; the extension takes the action when the threshold is reached.
Budget alert
Your Cloud Billing budget fires an alert as spend crosses each threshold.
Pub/Sub
The alert lands on a topic the extension creates when you install it.
The function checks
A Cloud Function compares the alert to your stop threshold. Below it, nothing happens.
Billing removed
At or above it, the billing account is detached and paid services stop.
Alerts notify, they don't act.
Firebase billing is usage based, so a bug such as a recursive function or a missing auth check, or outright abuse, can increase spend quickly. Google's budget alerts email you when a threshold is crossed, but they do not stop anything on their own (large unexpected bills are a documented risk).
This extension provides the missing step: it removes the billing account when your threshold is reached. Your data is preserved (storage, Firestore and config remain), so recovery is a matter of fixing the cause and reconnecting billing.
API disablement (Strategy 2) has been removed.
Google's Service Usage API no longer disables a service that still has live resources, and there is no flag to override it:
FAILED_PRECONDITION: Resources are found when disabling service(s)... please delete the following resources firstBilling account removal was always the recommended approach and is now the only one. Full reasoning and migration notes are in the CHANGELOG. If you run 1.x with DISABLE_BILLING set to No, switch it to Yes when you update.
Documentation.
Setup takes about ten minutes, including the budget and one IAM grant. The whole thing is four short pages.
How it works
Budgets, thresholds, and exactly what happens when the extension triggers.
Installation
Seven steps with screen recordings. Copy and paste commands included.
Recovery
Triggered? Find the cause, fix it, raise the budget, reconnect billing.
FAQ
Billing delays, log noise, what changed in 2.0.0, and where to get help.