Skip to main content

Posts

Showing posts from March, 2022

Getting VM Data Disk Ready During Azure DevOps Deployment (BICEP)

Hey Folks Back again with a small blog, and I think this is a helpful solution too. Do you know when you provision data disks using the Bicep template they are provisioned as raw disk..? So many of you provision the disks and handover to the dev or app team and they format the disk manually. But have you ever wondered if you can get the disk ready during the initial deployment itself.? Yes, it is possible. There are many different ways to do it when you are doing it during the implementation, today I'm focusing on how to do this using bicep templates. For this, I'm leveraging a resource module that was recently released by Microsoft. Which is, The virtualMachines/runCommands resource. you can use this to Run PowerShell commands once you provision the VM. I guess now you know what is about to come. :D You can get more details from the below link https://docs.microsoft.com/en-us/azure/templates/microsoft.compute/virtualmachines/runcommands?tabs=bicep In my lab setup, I have a few