Revise schema to support changing kinds, kind rates over time
What we're after
The first version of the usage schema includes the following assumptions:
- A Resource has a ResourceKind (Kind for short) that does not change.
- A Kind has a
credits,amount, andunit_of_measurethat together define how much the Kind costs:X creditspurchasesY amountof that Kind of resource, as measured inunits_of_measure.
These two assumptions are wrong:
- A Resource's Kind can change. For instance, a service instance can move from one plan to another.
- The rate we charge for a Kind can change. For instance, we may decrease the cost of databases if AWS changes their rates or we secure a savings plan.
One more assumption is likely untrue but not in scope: A Tier has a number of credits that will never change. That might or might not be true; maybe tiers have credit values that we update over time, or maybe we retire old tiers in favor of new ones. Regardless, we are not making changes to the tiers any time soon, so that can be handled separately.
We must revise the schema to support these changes over time.
Further context for those unfamiliar with what we're doing
This will impact calculations related to credit transactions.
Security considerations
None.
Notes for implementers
- None yet.
Related issues/sub-projects
- product#3275