Disable Pricing API calls via configuration
giventocode opened this issue · comments
Jesus Aguilar commented
Problem
When creating a list of available VM SKUs for a task, the TES server uses the Azure retail pricing API. If the API fails, a local list is used instead. However, when TES runs without public internet access, this behavior generates noise in network security appliances, monitoring logs, and firewalls.
Solution
Add a new setting to the TES server to disable the API call and always use the local list. The list must be constrained to the available SKUs of the Azure environment where TES is running (e.g. Azure or Azure Gov).
AC:
- Add a new setting,
EnableRetailPricingApi
, set toTrue
by default. - Create a new implementation of
IBatchSkuInformationProvider
that relies only on the local list and the Azure environment. Inject this implementation at boot time ifEnableRetailPricingApi == False
. - Add lists for different cloud environments or add the Azure environment as a column/property to the SKU list.