Build better budgets using folders and organizations
Product Management, Google Cloud Billing
TL;DR - Google Cloud budgets are now easier to customize, allowing you to scope costs by folders or organizations instead of the entire billing account or choosing specific projects.
The best way to keep an eye on your Google Cloud costs is by creating budgets. We've written about what budgets are and how to create them, as well as expanding budgets with programmatic notifications in the past. No matter if you're just getting started with Google Cloud or if you're an expert, budgets help you track and respond to your costs. With this latest launch, budgets are easier to customize so you can better organize your cost tracking!
What's in a budget?
If you haven't used budgets before, I definitely recommend checking out this post that goes into greater detail about how they work. In short, budgets are the most flexible and simplest way to get a handle on your costs. With all the potential ways that you can spend money on the cloud, you'll want to make sure you can keep track of your costs. Once you've put budgets in place, you can safely launch experimental and production features while having visibility into how those features might impact your costs.
Each budget is generally made up of a few things:
The period of time that the budget will look at. The most common budget is monthly, but you can also set up quarterly budgets, or even create non-repeating budgets for specific time periods like the holiday season.
What the budget looks at for costs, such as which products (like BigQuery or Compute Engine) or projects should be counted. This is also where the new folders and organizations option comes up, which we'll come back to shortly.
A fixed amount (such as $500) or a dynamic amount based on the spending from the last time range. Dynamic budgets can be helpful for comparing your spending month-to-month or quarter-to-quarter, which can stay on top of any cost anomalies.
Each budget can have multiple thresholds for your amount, which gives you further opportunities to customize. It's easy to set up a budget that sends you an email notification when you reach 25%, 50%, and 75% of $500 using a threshold for each percentage. You can also have thresholds that look at forecasted costs instead of actual, so you can get a notification when you're expected to hit $500 and take action even sooner. Thresholds can even go beyond 100%, so you can keep track of your actual or forecasted costs beyond the budget amount and stay notified!
By default, budgets will send out email notifications based on your thresholds. You can customize who gets those emails, but you can also expand your budgets to send out regular updates to a Pub/Sub topic. From there, you can easily subscribe to the topic and do just about anything you can write the code for, such as sending regular budget updates to Slack!
If you want to stay on top of your costs, you'll likely want to create multiple budgets covering different aspects of your costs, such as a budget for your development environment or maybe a unique budget for each team. The important part is to customize your budgets for what costs you care about, and thankfully that's a little bit easier now.
The best way to organize your resources in Google Cloud is to think about how your organization is structured. You might have a single project with all your resources, or if you're a large company you could have thousands of projects over multiple organizations. Google Cloud gives you the ability to create folders so you can set up an organizational hierarchy to manage those projects.
With the latest updates to budgets, you can now scope a budget to folders or organizations! Before, you could select which projects each budget would cover (or an entire billing account), but that means you'd have to update budgets when you add new projects. Even though it's possible to do with the budget API, it may be difficult to stay on top of adding or removing projects for larger organizations.
Thankfully, you can now select folders or organizations, and the budget will automatically cover all projects inside what you select, even if new ones get added. Scoping your budgets to folders makes it easier to customize exactly which costs you want to keep an eye on and better match your organizational hierarchy! It's as easy as selecting the folders and organizations when creating a budget through the console interface or through the API. Of course, you can also create multiple budgets, so each team might have a budget for all of the projects in their folder while you have an overall budget for the whole department.
This new feature gives budgets better granularity and simpler customization, and you don't even need to do anything to start using it. Just head to the console (or API) to start making budgets for what you care about. You can even use this interactive tutorial to help you set one up! Stay on top of what's new with the Cloud Billing release notes, and happy budgeting!