From 1bc8c23c629ccc0a36a12df0b916ec0ff58b748e Mon Sep 17 00:00:00 2001 From: Daniel Bradley Date: Fri, 18 Oct 2024 16:21:30 +0100 Subject: [PATCH] Make AgentPool updates cause replacement As noted on https://learn.microsoft.com/en-us/azure/aks/gpu-multi-instance?tabs=azure-cli#gpu-instance-profiles > You can't change the applied GPU instance profile after node pool creation. As noted on https://learn.microsoft.com/en-us/azure/aks/manage-node-pools#limitations > You can't change the VM size of a node pool after you create it. Fixes https://github.com/pulumi/pulumi-azure-native/issues/2462 --- provider/cmd/pulumi-resource-azure-native/schema.json | 6 ++++-- provider/pkg/gen/replacement.go | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/provider/cmd/pulumi-resource-azure-native/schema.json b/provider/cmd/pulumi-resource-azure-native/schema.json index ef1fc6bda8bb..1cc9780dce62 100644 --- a/provider/cmd/pulumi-resource-azure-native/schema.json +++ b/provider/cmd/pulumi-resource-azure-native/schema.json @@ -604000,7 +604000,8 @@ "$ref": "#/types/azure-native:containerservice:GPUInstanceProfile" } ], - "description": "GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU." + "description": "GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.", + "willReplaceOnChanges": true }, "hostGroupID": { "type": "string", @@ -604194,7 +604195,8 @@ }, "vmSize": { "type": "string", - "description": "VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions" + "description": "VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions", + "willReplaceOnChanges": true }, "vnetSubnetID": { "type": "string", diff --git a/provider/pkg/gen/replacement.go b/provider/pkg/gen/replacement.go index 296c52897947..e468dbf0667c 100644 --- a/provider/pkg/gen/replacement.go +++ b/provider/pkg/gen/replacement.go @@ -32,6 +32,10 @@ var forceNewMap = map[string]map[string]codegen.StringSet{ "nodeResourceGroup", "windowsProfile", ), + "AgentPool": codegen.NewStringSet( + "gpuInstanceProfile", + "vmSize", + ), }, "Insights": { "Component": codegen.NewStringSet(), // covered by x-ms-mutability