Since I wrote my blog article private aks and private acr, safer you are, the associated GitHub repository documenting and scripting how I deploy my own AKS cluster got few notable improvements:

Among these updates made to my Azure CLI script, I took the opportunity to write the equivalent in Terraform. Since it’s Infrastructure-as-Code as well as Documentation-as-Code, enjoy your walkthrough of the Terraform files ;)

I think Terraform files are easier (than bash script with Azure CLI) to write, maintain, read/understand, share and extend. Furthermore, you could re-run a new deployment/update with just the delta with the previous one. And destroying the entire infrastucture is just one line of code terraform destroy. Think about how you could do the two last scenarios with a bash script with Azure CLI with couple of if... then... else :)

Enjoy, cheers! ;)