Forum Discussion
toamisin
Oct 04, 2021Copper Contributor
Getting started with Azure using Terraform
Hi Guys, I am getting started to use my teams published terraform templates to proivision infrastructure in Azure. I have an idea of configsuring resoruces via portal but learning the automation side...
pgrjeremy
Oct 15, 2021Copper Contributor
Hey toamisin great to hear you are starting this journey! You will be happy with your work when its done. we have been using terraform to deploy to azure for several years now and love it. I would maybe start here. https://learn.hashicorp.com/collections/terraform/azure-get-started
Now... that said... the labs show how to deploy from local and you probably dont want to do that. you will want to use terraform cloud. the terraform workspace will hold the secret credentials to authentication to azure so they are not hard coded in your tf files. As for a getting started... I have some recommendations for how to structure your files but wont go into that too much until you go thru lab and have a good grasp of how deployments work and such. the labs will talk about consolidating all your resources into single tf file or seperating them into many, either is fine, I prefer many so to keep it organized nicely. keep me posted on your journey.
Now... that said... the labs show how to deploy from local and you probably dont want to do that. you will want to use terraform cloud. the terraform workspace will hold the secret credentials to authentication to azure so they are not hard coded in your tf files. As for a getting started... I have some recommendations for how to structure your files but wont go into that too much until you go thru lab and have a good grasp of how deployments work and such. the labs will talk about consolidating all your resources into single tf file or seperating them into many, either is fine, I prefer many so to keep it organized nicely. keep me posted on your journey.