Automating Azure Infrastructure with Bicep: Deploying 3 VNets, 9 Subnets & 2 VMs

Subrat YadavSubrat Yadav
1 min read

To practice the actual concepts of networking and azure templates I tried challenging myself picking up this task.

At first I tried the Azure GUI to get the feel of this concept or structure and it was succesful. But the only draw back I found was that it felt much slower to perform that task using GUI and you can’t duplicate stuff easily as you could do in the code.

Github link :- https://github.com/Yadav-SubratKumar/networking-bicep.git

What I did using Bicep was :-

✅ Create three Virtual Networks (VNets)
✅ Provision subnets in each VNet:

  • CoreServices: 4 subnets

  • Manufacturing: 4 subnets

  • Research: 1 subnet
    ✅ Deploy 1 VM in the CoreServices VNet
    ✅ Deploy 1 VM in the Manufacturing VNet


Why Bicep?

Bicep simplifies Azure deployments with:

  • Clean syntax (much easier than ARM JSON!)

  • Full intellisense & tooling in VS Code

  • Modular structure

  • Native support for Azure resources

My take on Bicep?

  • Easy to use for repeating work.

  • Faster then UI for multiple resource creation cases

  • Resource clean up is much faster.

0
Subscribe to my newsletter

Read articles from Subrat Yadav directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Subrat Yadav
Subrat Yadav