Skip to content

Help with the "right" way to build idempotent Bicep files for resources with network intents... #5839

Answered by brwilkinson
abrennan24 asked this question in Q&A
Discussion options

You must be logged in to vote

I am not familiar with this scenario. It seems like this is something that will not work well with Bicep declarative deployments.

  • What are you attaching the NSG's to? Are they specifically required on the subnet or could they be placed on a NIC etc?

A similar scenario is with Just In Time (JIT) policies and NSG.

The way that I manage it is as following.

  1. Deploy the blank NSG
    • Attach it to the VM NIC.
  2. Deploy the JIT Policy that adds rules to that NSG

By doing this it's easy to manage and Automate.

All prefered NSG rules are on the NSG that is attached to the Subnet, so the dedicated NIC NSG is just for the policy. By doing this can you continue to deploy without any conflict.

E.g.
htt…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@brwilkinson
Comment options

@abrennan24
Comment options

@brwilkinson
Comment options

@brwilkinson
Comment options

Answer selected by brwilkinson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants