feat: enable precondition on default_node_pool for autoscaling with node pool type#484
Conversation
@microsoft-github-policy-service agree |
zioproto
left a comment
There was a problem hiding this comment.
Keep 1 change per PR.
I added some comments to the new condition.
The old condition is correct, and should also be kept in place together with the new one you are proposing.
@lonegunmanb we should check with the product team if anyone is still actually using AvailabilitySet instead of VirtualMachineScaleSets. Because most customers are using multiple node pools we could just enforce the use of VirtualMachineScaleSets for the sake of simplicity.
5df4274 to
5ebd001
Compare
5ebd001 to
406f1a3
Compare
public_network_access_enabled attributedefault_node_pool for autoscaling with node pool type
|
Potential Breaking Changes in 406f1a3: |
There was a problem hiding this comment.
Thanks @ishuar for opening this pr! Almost LGTM but only one comment.
Btw, apology for our latest merged pr but now we have code conflict, would you please rebase your branch with the latest main branch? Thanks!
Describe your changes
Incorrect precondition on node poolsdefault_node_poolfor autoscaling with node pool type.Enable autoscaling only when the node_pool type is VirtualMachineScaleSets, otherwise throw an error.
✅ The below workflow is expected.
The Module had a bug with incorrect precondition on resourceazurerm_kubernetes_cluster_node_poolat herevariable
agents_typeis not relevant toazurerm_kubernetes_cluster_node_pool, only applicable todefault_node_poolin theazurerm_kubernetes_clusterresource.It might be working because of the default value of
agents_typevariable set toVirtualMachineScaleSets, ref @ herebut if the value is updated, additional node pools are not possible to create.
If we make following change to multiple_node_pools example. ( adding
agents_type = "Iamfake"). The plan fails.Click to view the plan with updated value
public_network_access_enabledAs the azure provider config is
version = ">= 3.80.0, < 4.0"public_network_access_enabled is deprecated and not passed to azure API, hence can be removed and cause no effect in the last version released on main branch.Issue number
N/A
#000
Checklist before requesting a review
CHANGELOG.mdfileThanks for your cooperation!