Skip to content

How to handle existing NSGs to update securityRules #6416

Answered by brwilkinson
e-karlsson asked this question in Q&A
Discussion options

You must be logged in to vote

there is really no simple solution here, the best thing to do is to lock down any manual changes from the NSG's and only do configuration as code deployments.

In saying that, there is a complicated workaround. I would even say, that i recommend the method above as a preference to this method, based on it's complexity.

Here is a template that deploys a website.

https://github.com/brwilkinson/AzureDeploymentFramework/blob/main/ADF/bicep/AppServiceWebSite.bicep

part of it uses the following existing resource reference... which is later used to list app config settings.

resource appsettingsCurrent 'Microsoft.Web/sites/config@2021-03-01' existing = [for (ws, index) in WebSiteInfo: if (WSInfo[i…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@e-karlsson
Comment options

@brwilkinson
Comment options

@brwilkinson
Comment options

Answer selected by brwilkinson
Comment options

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

@NTMatt
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants