The Azure pricing API often returns multiple price entries for the same instance type in a region, with different dates. We have been using isPrimaryMeterRegion == true to determine the currently active price, but there are in fact some instance types where there is no price returned where this condition is met (for reasons unknown).
To ensure these are not missed, we should compare dates and store the most recent price for a given instance type & region, rather than rely on isPrimaryMeterRegion.
The Azure pricing API often returns multiple price entries for the same instance type in a region, with different dates. We have been using
isPrimaryMeterRegion == true
to determine the currently active price, but there are in fact some instance types where there is no price returned where this condition is met (for reasons unknown).To ensure these are not missed, we should compare dates and store the most recent price for a given instance type & region, rather than rely on
isPrimaryMeterRegion
.