如何为多个规则创建多个NSG?例如,每个NSG具有不同的安全规则。因此,需要为此编写ARM模板。
创建的基于对象的参数。但是不知道该如何循环。
securityRules": {"value":
{
"DFS":
[
{"name": "VPN",
"description": "VPN","priority": "200","protocol": "*","sourceAddressPrefix": "172.16.4.0/24","sourcePortRange": "*","destinationAddressPrefix": "*","destinationPortRange": "*","access": "Allow","direction": "Inbound"
},
{"name": "MNG",
"description": "MNG","priority": "210","protocol": "*","sourceAddressPrefix": "10.96.254.0/24","sourcePortRange": "*","destinationAddressPrefix": "*","destinationPortRange": "*","access": "Allow","direction": "Inbound"
},
{"name": "AG",
"description": "AG","priority": "220","protocol": "*","sourceAddressPrefix": "10.95.0.0/22","sourcePortRange": "*","destinationAddressPrefix": "*","destinationPortRange": "*","access": "Allow","direction": "Inbound"
}
],
"NAV":
[
{"name": "VPN-1",
"description": "VPN","priority": "200","protocol": "*","sourceAddressPrefix": "172.16.5.0/24","sourcePortRange": "*","destinationAddressPrefix": "*","destinationPortRange": "*","access": "Allow","direction": "Inbound"
},
{"name": "MNG-1",
"description": "MNG","priority": "210","protocol": "*","sourceAddressPrefix": "10.97.254.0/24","sourcePortRange": "*","destinationAddressPrefix": "*","destinationPortRange": "*","access": "Allow","direction": "Inbound"
},
{"name": "AG-1",
"description": "AG","priority": "220","protocol": "*","sourceAddressPrefix": "10.96.0.0/22","sourcePortRange": "*","destinationAddressPrefix": "*","destinationPortRange": "*","access": "Allow","direction": "Inbound"
}
]
}