The Azure Terraformer’s Cheat Sheet: 10 Bookmarks You Can’t Ignore
Embarking on the journey of automating Azure infrastructure with Terraform can be both exciting and overwhelming. Whether you’re just getting started or you’re an expert Cloud Automation professional, there are a few critical resources that will make your life significantly easier. These links provide documentation, best practices, and tools that will help you write better Terraform code, troubleshoot issues, and discover new ways to optimize your Azure deployments. If you’re serious about mastering Terraform on Azure, and becoming an Azure Terraformer, these are the bookmarks you don’t want to miss.
№1 Terraform’s Homepage
This seems like a logical place to start. Its full of baseline documentation for the Terraform CLI as well as HashiCorp Configuration Language to help you with all those syntactical gyrations you will no doubt be performing.
https://www.terraform.io
№2 Terraform’s Registry
An absolute must stop is the Terraform Registry where you will be spending a lot of time “RTFM” on the various Terraform providers you are using (more on that later). Besides hosting the documentation for the Azure Terraform provider — or should I say “providers” — it also hosts documentation for a cadre of “Utility Providers” published by HashiCorp to make common, cloud agnostic tasks that much less laborous.
https://registry.terraform.io
№3 Terraform’s Azure Provider
There can be only one “Great One” and this is it. The azurerm Terraform provider. This beast “provides” hundreds of resources that you can use to automate all-the-things on the Azure platform. It is dutifully maintained in its hand-crafted glory to smooth out those rough edges. It is it’s own open source project so be a good comrade and pick up a book on Golang and take a crack at your first PR! For the good of the community!
https://registry.terraform.io/providers/hashicorp/azurerm/latest
№4 The “Imposter” Azure Provider
Just kidding. It’s not really an imposter. Surely I jest. The azapi provider is actually an amazing powertool that Azure Terraformers are finding great joy in overcoming that inevitable “open source” software delay in features making it into the azurerm provider after they are released to the unwashed masses via the Azure Portal and ARM. This Terraform provider is the “Bicep” killer. It basically allows you to use a single resource — the azapi_resource specify a type and a properties object and provision any old Azure resource you might want — sound familiar? Yes! This is how both ARM and Bicep work — right within Terraform! Side-by-side with the azurerm provider and any other Terraform providers you might be using.
https://registry.terraform.io/providers/Azure/azapi/latest
№5 The Azure AD ahem Entra ID Provider
Azure’s Identity & Access Management service is called AzureAD cough cough Sorry, I mean “Entra ID”. Although this provider goes by that old, never to be mentioned name of azuread it is still very relevant to modern Azure Terraforming. Often with Azure hosted applications and deployments we need some things to be setup over in Entra ID, whether its a User Group to create Azure Role Assigments with or an Application Registration to grant application-level permissions between our Web Front End and our REST API Back End, this provider is there for you!
https://registry.terraform.io/providers/hashicorp/azuread/latest
№6 Azure Verified Modules
Microsoft is making major investments in Terraform. It’s the only 3rd party Infrastructure-as-Code tool that Microsoft dedicates Full-Time Employees to. That’s the level of commitment Microsoft has been making to the Terraform community. But they’re taking it a step further too! They are investing in codifying all the best practices that can help you get off the ground running and off on the right foot!
https://aka.ms/avm
№7 Azure Resource Reference
This is a resource that I have stumbled upon many, many times over the years. It wasn’t always the most Terraform-friendly. Historically, this reference only consistent of ARM schema for each of the Azure Resource Types. You then had to map those to resources within the azurerm provider. I will say, it’s a little more friendly as there are ready made Bicep and Terraform, yes, Terraform schemas for all resources. Now one caveat is that the Terraform schemas are all done using azapi so its essentially just the ARM schema wrapped in a Terraform resource but — HEY — its a step in the right direction!
https://learn.microsoft.com/en-us/azure/templates/
№8 Azure’s Terraform Backend
The azurerm Backend for Terraform is one of those places in documentation that are not present in the forefront of your mind until you really really need it. Like for example, modifying the way you access your Terraform backend state to use Managed Identity access rather than Access Keys. It’s not a critical resource, until it is.
https://developer.hashicorp.com/terraform/language/backend/azurerm
№9 Azure’s Packer Builder
Ok. So you got me. There are actually multiple builders. The one I use most often is the azure-arm one. Notice that it repeats the a for an arm rather than an rm. ARM stands for Azure Resource Manager so the Packer builder azure-arm is actually the “Azure Azure Resource Manager” Builder. I can only forgive this faux paux due to the countless hours this bad boy has saved me in building repeatable Virtual Machine images for Azure-based workloads — or should I say “Azure Azure-based workloads”? ;-)
https://developer.hashicorp.com/packer/integrations/hashicorp/azure
№10 Azure Resource Explorer
OK, so this isn’t specifically a Terraform related resource but as Azure Terraformers we are often figuring out how to automate things — especially when we are working with a new Azure Service that we’ve never automated before! This resource allows us to more efficiently take a sneak peak at the resources that are deployed within our Azure Subscriptions, allowing us to bypass the rigamarole of doing an ARM template export from the Azure Portal!
https://resources.azure.com
Conclusion
Mastering Terraform on Azure isn’t just about learning syntax and running terraform apply—it’s about knowing where to find the right resources when you need them. These bookmarks are your secret weapon, giving you quick access to documentation, best practices, and essential tools that will make your Terraforming journey smoother. Whether you’re debugging an issue, looking for best-practice modules, or trying to stay ahead of new Azure features, these links will serve as life saving items on your proverbial Azure Terraforming “Bat-belt”!
Happy Azure Terraforming!