Azure / PSRule.Rules.Azure

Rules to validate Azure resources and infrastructure as code (IaC) using PSRule.
https://azure.github.io/PSRule.Rules.Azure/
MIT License
394 stars 86 forks source link

Update Azure.AKS.UptimeSLA with new pricing #2202

Closed BernieWhite closed 1 year ago

BernieWhite commented 1 year ago

Description of the issue

AKS SKU names have changed for what is represented in code.

Instead of setting sku.tier to Paid, it should be Standard.

"Basic" and "Paid" are removed in the 2023-02-01 and 2023-02-02 Preview API version, and this will be a breaking change in API versions 2023-02-01 and 2023-02-02 Preview or newer. If you use automated scripts, CD pipelines, ARM templates, Terraform, or other third-party tooling that relies on the above parameters, please be sure to update the API parameters to use "Base" with "Free" or "Base" with "Standard" before upgrading to the 2023-02-01 and 2023-02-02 Preview API or newer API versions.

Module in use and version:

Additional context

Related to #2065

BenjaminEngeset commented 1 year ago

@BernieWhite I can take it if you're already not working on it.

However, I'm wondering if we should check for the API version and have the rule working with API versions prior and the new ones with different vaules. Or if we should have it to the Standard no matter what, and instead recommend customers to update their API versions.

BernieWhite commented 1 year ago

@BenjaminEngeset Sure.

In terms of implementation. We should check API version otherwise we will break existing pipelines.

The logic would be something like this:

BenjaminEngeset commented 1 year ago

@BenjaminEngeset Sure.

In terms of implementation. We should check API version otherwise we will break existing pipelines.

The logic would be something like this:

  • If API version is not set, assume Standard.
  • If API version is greater then or equal to 2023-02-01 use Standard.
  • If API version is less then 2023-02-01 use Paid.

Great, thanks!