GCP compute can be both reserved AND on demand

😴
Bare minimum Mondays: wherein we scratch the surface of a topic to be explored further in a future post.

I was sitting around a table of practitioners recently, discussing the "vibe" of the big 3 cloud vendors - AWS, Azure, and GCP.  We all pretty much agreed that they live on a spectrum with "built for engineers" at one end and "built for the folks who pay the bills" at the other.  

<---built for engineers---------------built for finance--->

Azure is, in our unanimous opinion, built first for the folks who pay the bills.  It is the bill that I have spent the least amount of time in so far, primarily because I don't feel like I really needed a ton of effort to figure it out.  They give you two different versions of the bill - the Actual and the Amortized, and after that everything just kind of works. What things cost lives in the one and only column you'd think to look into.  

AWS lives in the middle - a world class technical feature set and obviously many years of hard won experience at play in the engineering of the CUR.

At the far end of the spectrum, in a world where engineers scoff at notions of paying for things and bean counter concepts like amortization lives GCP.

Rainbow created with garden hosepipe
Photo by James Wainscoat / Unsplash

One line item, many pricing models

Whereas in the other two vendors a given line item can be said to be either "on demand" or "reserved" (or .. savings plan'd), on GCP things are a little different.  The gist is that every line has two columns that tell you the world - cost and credits.  Cost can be thought of as the "on demand" cost of the thing, and then you subtract the credits column to arrive at something like the "net cost" of the item.  The trick is that credits is what's known in BigQuery as a "repeated" field.

The schema of the repeated credits record in your GCP bill.

Because this is bare minimum Monday, I'm not getting into the details here now.  All you need to know is that multiple credits can apply to any given line item.  A line item can and will have charges associated with a CUD, or multiple discreet CUDs, of potentially different types, as well as other random discounts/credits too.

The following is therefore a very common pattern in analyzing your GCP bill.

cost
- sum(credits)
--------------
net_cost

Now, net_cost is not the "true cost" of a resource either, because you're not  yet factoring in the cost of those discounts.  We'll get into lots of specifics in future posts.