I'm really interested in getting started with Infrastructure as Code (IaC) in Azure, but I'm not sure where to begin. I prefer learning by doing, so I'm curious about how to transition from using the portal to solely relying on code. What tools and environments do you typically use? Do you mostly work with virtual machines and databases, or is there more to it? I'd appreciate any tips or resources you can share for a newbie like me!
5 Answers
A great way to start is by exploring the Azure Verified Modules on GitHub. It's a solid resource that outlines different modules you can use, but keep in mind that it might not give you the complete picture for building modules from scratch.
Starting out can be tough without the portal, but what worked for me was selecting a resource in Azure, understanding its configuration details, referring to the official docs, and then writing the Terraform code for it. Apply your code in a test environment to see how it goes, and progressively tackle more complex setups. Plus, always lean on the official Terraform docs for guidance!
Before diving into IaC, it’s essential to get a grasp on solution architecture. This will help you learn what services you need and how to deploy them. After that, the real learning will come through practice—just read the documentation and apply your findings in a test account. A great tip is to build something in the portal first, so you have a reference when using Terraform. Don't stress about VMs or databases to start—just try setting up a resource group.
I recommend checking out Ned Bellavance's courses on Pluralsight. He has one specifically about implementing Terraform in Azure, and you can pick up a lot in just one sitting. It's perfect for beginners!
One effective approach is to find a guide that shows how to set things up using the Azure portal, then try to recreate it with Terraform or Bicep on your own. It’s a good practical exercise!

That's really a smart method! It helps you to actually understand what's happening instead of just copying code.