Billing and Dashboards
Sections in this Page
Access and Roles
- Billing Administration is only possible by members of the gcp-billing-admins group.
- Read-only billing visibility is currently provided to the gcp-project-viewers group, for convenience. (Through the Billing Account User role.)
- Furthermore, groups and identities can be given access to billing information related to their projects, without giving access to entire billing account.
Labels
Resources are labelled to facilitate slicing and dicing of data. Furthermore, the Project Factory enforces standard labels. These include:
- Application name
- Component type
- Environment (e.g. dev-1, dev-2, etc)
- Environment category (e.g. Non-Prod and Prod).
Other labels could be added. This screenshot demonstrates how such views can be filtered:
Billing Alerts
Billing alerts have been configured at 50%, 75%, 90%, and 100% of a specified threshold, with email alerts going to billing admins and billing account users.
Custom Billing Reports
- Here we can see the billing report for all resources used during the creation of this solution. Steady state is now at about £4/day.
- Costs can be viewed at resource (SKU) level. A custom report has been created to do this:
Biling Exports
Billing exports have been enabled, meaning that billing data is automatically exported to Google BigQuery. From here:
- Direct analytics can be performed, e.g. using SQL queries.
- E.g. this billing report shows the total cost of all projects with a spend (excluding promotional credits) greater than 0.01:
Billing Dashboards
The billing exports in BigQuery can be used as a data source to custom dashboards in Data Studio. Here I have configured a sample dashboard, presenting various views of the billing data, e.g. costs by service, costs by project, etc.
The dashboard is available here (please request access).
Indicative Costs
Costs can be estimated from two main sources:
- The Google Cloud Pricing Calculator.
- The generated billing data.
Some headlines:
- A single highly available non-prod environment runs at under £4/day, or approximately £1500/year.
- Most of this cost is attributable to compute. (Many services in the architecture have negligible cost.)
- The production environment would cost more, on account of using larger application server and DB instances. A reasonable estimate would be £2000/year. This could go higher, depending on demand on the application.
- Clearly, the more environments that are running in parallel, the higher the overall TCO.
- If we were running 5 dev environments, a QA environment, a Pre-Prod environment and a Prod environment in parallel, 24x7, the cost would be in excess of £12000/year.
- Consequently, it is advisable to stop or tear down environments that are not in use.