DevOps Engineer
Manav specializing in Google Cloud Platform (GCP) with expertise in designing and implementing automation solutions to optimize and streamline cloud operations.
If you're managing costs on Google Cloud Platform (GCP), you already know that Committed Use Discounts (CUDs) are one of the most effective ways to reduce your cloud bill. By committing to a one- or three-year usage plan, you get heavily discounted rates compared to pay-as-you-go pricing.
But here’s the kicker: while you can view CUD data in the GCP Console, you can’t access it via BigQuery billing export, which is where most teams do their reporting and automation. That means this vital information is trapped in the UI, disconnected from your dashboards, pipelines, or alerting systems.
While working on cost optimization at CloudKeeper, I ran into this exact limitation. We were building our CloudKeeper Lens to unify all GCP billing data — usage, service-level costs, and commitment data — in one place. But we quickly hit a wall: there’s no API, no export, no CLI tool to fetch CUD details. Only a browser.
So, I decided to build my own automation. In this post, I’ll share exactly how I solved this problem — using Python, Selenium, and some practical engineering — and how it now helps both my team and our clients get better visibility into their cloud spend.
Google’s billing export to BigQuery provides an excellent foundation for cloud cost analysis. But it’s incomplete, especially when it comes to commitments. The export is missing:
Without this data, it’s almost impossible to build alerts for expiring discounts, compare committed vs actual usage, or create a transparent cost model across engineering and finance.
These alerts help teams take timely action — whether that means renewing commitments, shifting workloads, or re-evaluating spend.
Here's a look at the core components of the Python script I built to automate the retrieval of GCP Committed Use Discount (CUD) reports. This script logs in with MFA, downloads CSV reports, and uploads them to GCS while emailing them to stakeholders.
This automation has unlocked previously inaccessible data, transforming it into a central asset for cost governance.
Teams now have real-time insight into how well CUDs are performing. Finance and engineering share a unified view, which helps in planning and accountability. We’ve already optimized spend by renewing the right commitments and reallocating underutilized ones.
In short, we’ve gone from guesswork to clarity — and we’ve done it without waiting for Google to fill in the gaps.
This isn’t just a technical workaround — it’s a strategic enabler. If your team is using CUDs, you owe it to yourself to track them properly. And unless you have this data in your reporting and monitoring workflows, you're flying blind.
Automation puts you back in control. It ensures your cloud discounts are being used as intended and helps you avoid surprises at renewal time.
It’s entirely possible that Google Cloud will one day expose CUD data via an API or include it in billing exports. But until then, browser automation gives us what we need: visibility, control, and the ability to act.
At CloudKeeper, we’ve implemented this internally and helped clients do the same as part of broader cost optimization efforts. If you’re struggling with CUD visibility, feel free to reach out — we’re happy to share what we’ve learned.
Speak with our advisors to learn how you can take control of your Cloud Cost