handsome-state-5977504/26/2021, 2:00 PM
broad-dog-2246304/26/2021, 2:03 PM
as a param to do that
handsome-state-5977504/26/2021, 2:41 PM
on azure portal: aks566fe557
cs.ManagedCluster( resource_name='aks', ...
broad-dog-2246304/26/2021, 2:42 PM
tall-librarian-4937404/26/2021, 2:44 PM
property of the resource in Python…
handsome-state-5977504/27/2021, 4:27 AM
(as I should, I believe, when overriding autonaming?), I expect Pulumi to block any updates to that resource if that update requires replacement - and thus, deletion in this case. Is my intuition correct?
tall-librarian-4937404/27/2021, 5:59 AM
is applies automatically if you switch off auto-naming. and yes, protect=true should prevent any deletion.
in the argument type.
handsome-state-5977504/27/2021, 7:24 AM
cs.ManagedCluster( resource_name=resource_name, resource_name_=resource_name, # Overrides auto-naming resource_group_name=resource_group.name, ...
tall-librarian-4937404/27/2021, 7:46 AM
handsome-state-5977504/27/2021, 7:56 AM
quoting https://www.pulumi.com/docs/intro/concepts/resources/#autonamingis applies automatically if you switch off auto-naming
Overriding auto-naming makes your project susceptible to naming collisions. As a result, for resources that may need to be replaced, you should specifyso which is it?in the resource’s options. This option ensures that old resources are deleted before new ones are created, which will prevent those collisions.
tall-librarian-4937404/27/2021, 8:19 AM
has no downside too, so it’s okay to include it
handsome-state-5977504/27/2021, 9:11 AM
p state unprotect --all -y && p up -r --show-replacement-steps -y
I was expecting this combination of config and commands to let pulumi delete and recreate the resource if necessary. where could i be going wrong?
azure-native:containerservice:ManagedCluster (aks): error: cannot create already existing resource '/subscriptions/****/resourceGroups/****/providers/Microsoft.ContainerService/managedClusters/****-aks'