DEV Community

Discussion on: Deploying Infrastructure to Azure with Terraform and Azure DevOps

Collapse
 
ariehein profile image
Arie Heinrich

Few points to add:

  1. There is an official Terraform task maintained by MS, its preferable to use that one.
  2. Its 2020, use Terraform 0.12, not 0.11 please
  3. For best practices, dont use values in your *.tf files, instead create a variables.tf or even variables.dev.tf or what ever naming schema/folder structure you want so its visible to what env it belongs, and in the plan and apply add to the command -var-file=variables.dev.tf for dev and change per stage. This way executing the same steps for diff env doesnt require messing with azure devops but rather committing files to the repo which is the true essence of IAC
Collapse
 
josema88 profile image
Jose Ordoñez

Hey Arie, I agree with you. I´ll try to update this post since I created this tutorial some time ago.
For this tutorial, I focused on just deploy infrastructure using Azure DevOps and left behind some best practices like the variables file. Thanks for your comment.