-1

I'm currently trying to figure out if its possible to use an arm template to assign a NSG that's been created in a separate resource group to the subnet of a new resource group being spun up via an ARM template. I've come across multiple templates where the template creates and applies a NSG to an existing subnet(like the one below.) I'm trying to assign a NSG that already exists to an newly created subnet if possible.

Has anyone ever attempted this that might have some pointers, or are there any good resources out there I may have missed in my initial googling that I could leverage to complete this?

4

1 回答 1

1

是的,只需这样做:

"subnets": [
    {
        "name": "someName",
        "properties": {
            "addressPrefix": "somePrefix",
            "networkSecurityGroup": {
                "id": "[resourceId('rgName', 'Microsoft.Network/networkSecurityGroups', 'nsgName')]"
            }
        }
    }
于 2018-10-18T17:54:02.710 回答