Writing Terraform modules for Azure
When learning about Terraform modules, we need to understand how we can draft modules for an Azure Resource Manager (azurerm
) provider. This will help you out when starting to create azurerm
modules and provisioning resources in Microsoft Azure using these modules. For a further understanding about Terraform modules for Azure, let's try to create a virtual machine (VM) with the keyvault
module. We have created all the module Terraform files and placed them in our chapter GitHub repository at https://github.com/PacktPublishing/HashiCorp-Infrastructure-Automation-Certification-Guide/tree/master/chapter7/azurerm/azurerm-virtual-machine-module.
The following files are present in our GitHub repository under the azurerm
directory, which you can clone to your local machine and then start consuming it:
inmishrar@terraform-lab-vm:~/HashiCorp-Infrastructure-Automation-Certification-Guide/chapter7/azurerm# tree . ├── azurerm...