I’ve been working on a small open-source project called NoBBomb (No Billing Bomb).
In short, it’s a GCP Kill Switch designed to protect you from unexpected high bills by targeting high-risk services. Currently supported services include:
Gemini API
BigQuery
Firestore
…and more to come!
The cost are estimated using Cloud Monitoring Metrics which can be fetched after 5 minutes. Cloud Billing Alerts can be very slow unfortunately.
It’s designed for small businesses, students, or non-critical projects (like dev environments or sandboxes). Any project that can be turned off abruptly.
Deployment is simple, just run the deploy.sh script in the root directory. Then, set your desired budget:
Daily (last 24h)
Weekly (last 7 days)
Monthly (last 30 days)
The app will estimate the cost of supported APIs, and if you enable NUKE_MODE = True, it will automatically disable them to protect you from unexpected bills.
By default, the script runs every 30 minutes when deployed via deploy.sh.
As the app is not perfect, I’d love to get your feedback! Feel free to try it out and open discussions on GitHub. Contribution guidelines will be coming soon.
You’re also welcome to fork this project or modify the code however you like. If you’re curious about how it works, for example, you could add an alert system instead of automatically disabling the APIs.
I’m sure most of is know what it’s like trying to figure out what we did specifically to trigger this continuous debt to some api and unsure of how it is possibly spending money. (I learned my lesson by enabling apigee, despite never using it. That was a very expensive few weeks even after gcp split the bill with me, lol.
I’ll be giving this a shot on a new project though, i recently had a bunch of credits munched up unexpectedly. Just s few bucks but still, id prefer my credits or money.
Really nice, I love ‘scripting’ my life. I most certainly will be looking into it to get my head around the technical part and contributing to the its growth, if possible. Happy coding💻
Very impressive design work! My question to you and the Team … has someone looked at 1. Taking the GCP Kill switch termination limit information, that specified the cost limit and final data obtained when the access to the cloud platform is terminated. Then, 2. Send this information for a query of cost/Benefit analysis to show to project management and project owners a real time explanation of specific savings of a project critical element(s)?
Perhaps copyright the GCP Kill Switch/Cost/Benefit analysis
Thank you for allowing me to be part of your Team,
Services covered by the app are limited, and expenses are recorded in Log Explorer via Cloud Run. That said, I’m pretty sure it could be improved to work like this
I think it could be done too but manually (at first) during a post-mortem. It could be interesting to automate that, especially if the app is used on a professional environment
About the copyright, the app is under the MIT License and is open source. Personally, I’m not concerned about it, but, for example, if a freelancer wants to implement and resell it as a security measure, that’s okay and intended