Cloning Azure RM Network Security Group rules between NSGs

gsimon
gsimon
Aug 22, 2017 · 1 min read

As a good practice here, we prefer to have a specific network security group for each subnet. This way, its easier to manage the standard rules for each subnet. Even with that, we always have standard rules that are the same for every network security group. Sorry but, I’m too lazy to recreate these standard rules manually when deploying a new subnet and, due to that, I wrote this small script to help me on this process. Needless to say, you need to first create the destination NSG and, on the below script, change the variables according your environment.


Simon Time!

Expeditions through IT and life experiences, trying to create the habit of writing.

)
gsimon

Written by

gsimon

Simon Time!

Expeditions through IT and life experiences, trying to create the habit of writing.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade