Skip to content

Instantly share code, notes, and snippets.

@rahulsahay19
Created March 25, 2020 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulsahay19/b5572aa3b47a4098f6d4cd4885bef82d to your computer and use it in GitHub Desktop.
Save rahulsahay19/b5572aa3b47a4098f6d4cd4885bef82d to your computer and use it in GitHub Desktop.
nic.json
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2019-07-01",
"name": "[parameters('networkInterfaceName')]",
"location": "[parameters('location')]",
"dependsOn": [
"[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]",
"[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]",
"[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]"
],
"tags": {
"demo": "azure"
},
"properties": {
"ipConfigurations": [
{
"name": "ipconfig1",
"properties": {
"subnet": {
"id": "[variables('subnetRef')]"
},
"privateIPAllocationMethod": "Dynamic",
"publicIpAddress": {
"id": "[resourceId(resourceGroup().name, 'Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]"
}
}
}
],
"networkSecurityGroup": {
"id": "[variables('nsgId')]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment