Is anyone facing issues when you create an AKS cluster and then run it again? Here it's trying to update the subnet, even if no updates were done in code. When some pool is added, there are some changes to the vnet regarding ipconfig. Pulumi is refreshing then, and it's trying to delete the subnet to recreate. What is non-sense, as the subnet is attached.For anyone interested in this. When you activate the virtual-node addon, Azure will enable private links and endpoints. Pulumi will recognize this change and it will try to recreate the vnet.After all, azure-native will try to recreate the vnet if any node_pool is added (which make changes to the ipConfiguration) and a refresh is triggered:
Before we were creating the vnet, and then a subnet was assigned to this vnet. azure-native wasn't able to understand this, and after a refresh when azure returned the subnets as part of the vnet, it would try to recreate it.Moving the subnet initialization inside the vnet class, it stopped behaving weirdly.
1 month ago
This a ”feature“ since the dawn of Azure Resource Manager (ARM) that why I always create my subnets inside the VNET. The only time I don’t see the weirdness is with terraform which is correcting the issue behind the scenes. Since Pulumi goes to the ARM API, the result is the same as ARM templates and bicep.https://github.com/Azure/azure-quickstart-templates/issues/2786