Mixed Linux and Windows VM Deployment

Hi guys, fairly new to terraform and really enjoying it.

Quick question for some guidance, for a simple AZURE deployment of a single resource group, Vnet and subnet, I want to deploy a Linux VM and a Windows VM.

Question is, do I have a separate folder with main.tf for the various VM resource types? I struggle with the concept of trying to put both VM types in the single main.tf file and then use variables for both machines - what are your thoughts?

My future steps will hopefully include modules as i progress, or would you got for modules straight off the bat?

Thanks for any replied, its appreciated.

Hi @devopspaul
terraform will use all *.tf files in the current working directory. Therefore you can have all resources in a single file or split resources into multiple files.
Best practice is building reusable code and therefore use modules. Also check the terraform registry modules.

https://registry.terraform.io/browse/modules?provider=azurerm