Hi,
given a set of terraform resources do people manage state transitions using terraform? Or is this not advised? I’m probably not describing myself well. One example is we have an aks cluster defined in terraform and we want to increase the sku of the default nodepool.
This is possible using the steps below.
- create new system nodepool named mytransitionnodepool with new sku for a transition phase
az aks nodepool add -g myResourceGroup --cluster-name myAKSCluster -n
mytransitionnodepool--mode system --node-vm-size = Standard_D2S_v3
- delete original nodepool
az aks nodepool delete -g myResourceGroup --cluster-name myAKSCluster -n
myoriginalnodepool - create new system nodepool named myoriginalnodepool with new sku
az aks nodepool add -g myResourceGroup --cluster-name myAKSCluster -n
myoriginalnodepool--mode system --node-vm-size = Standard_D2S_v3
- delete mytransitionnodepool nodepool
az aks nodepool delete -g myResourceGroup --cluster-name myAKSCluster -n
mytransitionnodepool - change the terraform myoriginalnodepool to be the same sku
- run terraform plan
In essence i believe that terraform will want to teardown and recreate the cluster as the name of the backing VMSS machines are different (seem to have a 8 character number injected in their name upon creation).
Are the best practices for such procedures, as it feels wrong to have Infrastructure as code
and then perform some manual steps and then resync the infrastructure code?
Or do people do some form of automated creating second cluster,move traffic to point to new cluster delete old cluster?