Skip to content

nesting modules: how deep do you go? #4995

Answered by brwilkinson
azMantas asked this question in General
Discussion options

You must be logged in to vote

I have found the layering and nesting of modules to be super useful.

On average I go 3 layers, however I think my maximum is about 6 layers.

One thing I find useful, is to give your Modules meaningful names, since they become deployment names. So you will want to trace them say in the portal (or with PowerShell) as you dig into the layers/deployments. Plus they have to be unique.

I also found that for things like below I want to call them from more than 1 place. I started naming these: x.modulename.bicep

  • NIC

  • Public IP

  • DNS A Record

  • File Share or Container

  • PrivateLink

    e.g.

  • As an example I call the public IP x module from all of these.

I also have some templates that just gen…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@azMantas
Comment options

@brwilkinson
Comment options

Answer selected by azMantas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants