DevOps Engineer. Solutions Architect

Blog 1 Spring 2021: Setting up Budget Alerts on Google Cloud Platform

Developers constantly face the issue of maintaining cost-efficiency when hosting their application on 3rd party platforms. Providers such as Google Cloud Platform and AWS provide developers the necessary tools to keep costs within a budget. Whether it’d be notifying through a monitoring workspace or email, budget alerts is a convenient way to ensure service costs don’t exceed a certain threshold. This tutorial will be covering GCP’s Cloud Billing budgets handler and how to setup a budget alert.

Creating the Project Budget and Alerts

  1. First, select the desired project then proceed to the “Billing” section on the left-hand navigation pane.
    Imgur

  2. Navigate to the “Budgets & alerts” tab and select “Create Budget”.

  3. Fill out the budget information to meet project specifications. Project managers can set the specific services the budget applies to and to add any applicable discounts/credits. The cost trend chart shown below, shows a summarized bar-chart view of the project’s cost in the past 12 months.
    Imgur

  4. Proceed to the “Amount” section of the process and choose the “Budget type”. Once selected set the “Target amount”.
    Imgur

  5. Move along to the “Actions” section. This section sets alert thresholds that will then email members on a list if a spend exceeds a specified amount. Make sure to specify the method of notification. Google Cloud can notify teams through direct email or can send messages to a channel within a monitoring workspace
    Imgur

  6. Click “Finish” and verify the new budget creation inside the “Billing” section of the project.

For a more programmatic approach feel free to use Cloud Billing Budget API to setup a project budget. This will be covered in the next article.