forked from erjosito/azure-networking-lab
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nic_NSG_noSLB_PIP_static.json
99 lines (99 loc) · 3.5 KB
/
nic_NSG_noSLB_PIP_static.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"nicName": {
"defaultValue": "myNic",
"type": "string"
},
"vnetName": {
"defaultValue": "myVnet",
"type": "string"
},
"subnetName": {
"defaultValue": "serverSubnet",
"type": "string"
},
"ipAddress": {
"defaultValue": "10.0.0.1",
"type": "string"
},
"pipName": {
"defaultValue": "myPIP",
"type": "string"
},
"pipSku": {
"defaultValue": "basic",
"type": "string"
}
},
"variables": {
"networkApiVersion": "2016-03-30"
},
"resources": [
{
"comments": "Public IP address",
"type": "Microsoft.Network/publicIPAddresses",
"sku": {
"name": "[parameters('pipSku')]",
"tier": "Regional"
},
"name": "[parameters('pipName')]",
"apiVersion": "2018-02-01",
"location": "[resourceGroup().location]",
"properties": {
"publicIPAllocationMethod": "[if(equals(parameters('pipSku'), 'basic'), 'Dynamic', 'Static')]",
"idleTimeoutInMinutes": 4
},
"resources": [],
"dependsOn": []
},
{
"comments": "NSG with no custom rules, only the default rules",
"type": "Microsoft.Network/networkSecurityGroups",
"name": "[concat(parameters('nicName'), '-nsg')]",
"apiVersion": "[variables('networkApiVersion')]",
"location": "[resourceGroup().location]",
"properties": {
"securityRules": []
},
"resources": [],
"dependsOn": []
},
{
"comments": "NIC created with static IP address, no public IP and IP Forwarding",
"type": "Microsoft.Network/networkInterfaces",
"name": "[parameters('nicName')]",
"apiVersion": "[variables('networkApiVersion')]",
"location": "[resourceGroup().location]",
"properties": {
"ipConfigurations": [
{
"name": "[concat(parameters('nicName'), '-ipConfig')]",
"properties": {
"privateIPAddress": "[parameters('ipAddress')]",
"privateIPAllocationMethod": "Static",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('pipName'))]"
},
"subnet": {
"id": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('vnetName')), '/subnets/', parameters('subnetName'))]"
}
}
}
],
"dnsSettings": {
"dnsServers": []
},
"enableIPForwarding": true,
"networkSecurityGroup": {
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', concat(parameters('nicName'), '-nsg'))]"
}
},
"resources": [],
"dependsOn": [
"[concat(parameters('nicName'), '-nsg')]"
]
}
]
}