Created
June 25, 2018 01:21
-
-
Save tjws052009/3b4f4ceb9064a49ea467d4074af47edc to your computer and use it in GitHub Desktop.
Azure ARM Template for 2VMs and 1 Load Balancer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"loadBalancers_app_lb_name": { | |
"defaultValue": "app-lb", | |
"type": "String" | |
}, | |
"virtualMachines_app_vm_name": { | |
"defaultValue": "app-vm", | |
"type": "String" | |
}, | |
"virtualMachines_db_vm_name": { | |
"defaultValue": "db-vm", | |
"type": "String" | |
}, | |
"virtualMachine_username": { | |
"defaultValue": "dev", | |
"type": "String" | |
}, | |
"virtualMachine_password": { | |
"defaultValue": "password", | |
"type": "secureString" | |
}, | |
"networkInterfaces_app_vm_name": { | |
"defaultValue": "app-vm", | |
"type": "String" | |
}, | |
"networkInterfaces_db_vm_name": { | |
"defaultValue": "db-vm", | |
"type": "String" | |
}, | |
"publicIPAddresses_app_vm_ip_name": { | |
"defaultValue": "app-vm-ip", | |
"type": "String" | |
}, | |
"publicIPAddresses_db_vm_ip_name": { | |
"defaultValue": "db-vm-ip", | |
"type": "String" | |
}, | |
"publicIPAddresses_app_lb_ip_name": { | |
"defaultValue": "app-lb-ip", | |
"type": "String" | |
}, | |
"networkSecurityGroups_app_vm_nsg_name": { | |
"defaultValue": "app-vm-nsg", | |
"type": "String" | |
}, | |
"networkSecurityGroups_db_vm_nsg_name": { | |
"defaultValue": "db-vm-nsg", | |
"type": "String" | |
}, | |
"virtualNetworks_IaaSNetwork_vnet_name": { | |
"defaultValue": "IaaSNetwork-vnet", | |
"type": "String" | |
}, | |
"securityRules_app_vm_SSH_name": { | |
"defaultValue": "SSH", | |
"type": "String" | |
}, | |
"securityRules_db_vm_SSH_name": { | |
"defaultValue": "SSH", | |
"type": "String" | |
}, | |
"subnets_db_subnet_name": { | |
"defaultValue": "db-subnet", | |
"type": "String" | |
}, | |
"subnets_app_subnet_name": { | |
"defaultValue": "app-subnet", | |
"type": "String" | |
}, | |
"virtualMachines_app_vm_disk_name": { | |
"defaultValue": "app-vm-disk", | |
"type": "String" | |
}, | |
"virtualMachines_db_vm_disk_name": { | |
"defaultValue": "db-vm-disk", | |
"type": "String" | |
} | |
}, | |
"variables": {}, | |
"resources": [ | |
{ | |
"comments": "Create a VM for the App Server", | |
"type": "Microsoft.Compute/virtualMachines", | |
"name": "[parameters('virtualMachines_app_vm_name')]", | |
"apiVersion": "2017-12-01", | |
"location": "southeastasia", | |
"scale": null, | |
"properties": { | |
"hardwareProfile": { | |
"vmSize": "Standard_B1s" | |
}, | |
"storageProfile": { | |
"imageReference": { | |
"publisher": "OpenLogic", | |
"offer": "CentOS", | |
"sku": "7.4", | |
"version": "latest" | |
}, | |
"osDisk": { | |
"createOption": "FromImage", | |
"managedDisk": { | |
"storageAccountType": "Premium_LRS" | |
}, | |
"diskSizeGB": 31 | |
}, | |
"dataDisks": [] | |
}, | |
"osProfile": { | |
"computerName": "[parameters('virtualMachines_app_vm_name')]", | |
"adminUsername": "[parameters('virtualMachine_username')]", | |
"adminPassword": "[parameters('virtualMachine_password')]", | |
"secrets": [] | |
}, | |
"networkProfile": { | |
"networkInterfaces": [ | |
{ | |
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_app_vm_name'))]" | |
} | |
] | |
} | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_app_vm_name'))]" | |
] | |
}, | |
{ | |
"comments": "Create a VM for the DB Server", | |
"type": "Microsoft.Compute/virtualMachines", | |
"name": "[parameters('virtualMachines_db_vm_name')]", | |
"apiVersion": "2017-12-01", | |
"location": "southeastasia", | |
"scale": null, | |
"properties": { | |
"hardwareProfile": { | |
"vmSize": "Standard_B1s" | |
}, | |
"storageProfile": { | |
"imageReference": { | |
"publisher": "OpenLogic", | |
"offer": "CentOS", | |
"sku": "7.4", | |
"version": "latest" | |
}, | |
"osDisk": { | |
"createOption": "FromImage", | |
"managedDisk": { | |
"storageAccountType": "Premium_LRS" | |
}, | |
"diskSizeGB": 31 | |
}, | |
"dataDisks": [] | |
}, | |
"osProfile": { | |
"computerName": "[parameters('virtualMachines_db_vm_name')]", | |
"adminUsername": "[parameters('virtualMachine_username')]", | |
"adminPassword": "[parameters('virtualMachine_password')]", | |
"secrets": [] | |
}, | |
"networkProfile": { | |
"networkInterfaces": [ | |
{ | |
"id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_db_vm_name'))]" | |
} | |
] | |
} | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_db_vm_name'))]" | |
] | |
}, | |
{ | |
"comments": "Generalized from resource: '/subscriptions/855587bb-032d-4581-b845-dcd9b2c9469e/resourceGroups/IaaSNetwork/providers/Microsoft.Network/loadBalancers/app-lb'.", | |
"type": "Microsoft.Network/loadBalancers", | |
"sku": { | |
"name": "Basic", | |
"tier": "Regional" | |
}, | |
"name": "[parameters('loadBalancers_app_lb_name')]", | |
"apiVersion": "2018-02-01", | |
"location": "southeastasia", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"resourceGuid": "c4213523-0cee-47df-97a5-a7c5a2021d41", | |
"frontendIPConfigurations": [ | |
{ | |
"name": "LoadBalancerFrontEnd", | |
"etag": "W/\"4410313c-9dd2-46e0-841b-4e1f3d035f08\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"privateIPAllocationMethod": "Dynamic", | |
"publicIPAddress": { | |
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_app_lb_ip_name'))]" | |
} | |
} | |
} | |
], | |
"backendAddressPools": [], | |
"loadBalancingRules": [], | |
"probes": [], | |
"inboundNatRules": [], | |
"inboundNatPools": [] | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_app_lb_ip_name'))]" | |
] | |
}, | |
{ | |
"comments": "NIC for App VM", | |
"type": "Microsoft.Network/networkInterfaces", | |
"name": "[parameters('networkInterfaces_app_vm_name')]", | |
"apiVersion": "2018-02-01", | |
"location": "southeastasia", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"resourceGuid": "6948b72b-77fb-4cf5-8b40-88184fcb13a4", | |
"ipConfigurations": [ | |
{ | |
"name": "ipconfig1", | |
"etag": "W/\"c87bc86b-80aa-4551-8585-ece37aea53cf\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"privateIPAddress": "10.1.1.4", | |
"privateIPAllocationMethod": "Dynamic", | |
"publicIPAddress": { | |
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_app_vm_ip_name'))]" | |
}, | |
"subnet": { | |
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_IaaSNetwork_vnet_name'), parameters('subnets_app_subnet_name'))]" | |
}, | |
"primary": true, | |
"privateIPAddressVersion": "IPv4" | |
} | |
} | |
], | |
"dnsSettings": { | |
"dnsServers": [], | |
"appliedDnsServers": [], | |
"internalDomainNameSuffix": "mla1d0xgqz2ulipwwxvrss1opd.ix.internal.cloudapp.net" | |
}, | |
"macAddress": "00-0D-3A-07-DF-7E", | |
"enableAcceleratedNetworking": false, | |
"enableIPForwarding": false, | |
"networkSecurityGroup": { | |
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_app_vm_nsg_name'))]" | |
}, | |
"primary": true | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_app_vm_ip_name'))]", | |
"[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_IaaSNetwork_vnet_name'), parameters('subnets_app_subnet_name'))]", | |
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_app_vm_nsg_name'))]" | |
] | |
}, | |
{ | |
"comments": "NIC for DB VM", | |
"type": "Microsoft.Network/networkInterfaces", | |
"name": "[parameters('networkInterfaces_db_vm_name')]", | |
"apiVersion": "2018-02-01", | |
"location": "southeastasia", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"resourceGuid": "ae163c0d-4389-4fff-8042-31526649fbe3", | |
"ipConfigurations": [ | |
{ | |
"name": "ipconfig1", | |
"etag": "W/\"6c8197f2-e447-4645-861b-eed262b19730\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"privateIPAddress": "10.1.1.68", | |
"privateIPAllocationMethod": "Dynamic", | |
"publicIPAddress": { | |
"id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_db_vm_ip_name'))]" | |
}, | |
"subnet": { | |
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_IaaSNetwork_vnet_name'), parameters('subnets_db_subnet_name'))]" | |
}, | |
"primary": true, | |
"privateIPAddressVersion": "IPv4" | |
} | |
} | |
], | |
"dnsSettings": { | |
"dnsServers": [], | |
"appliedDnsServers": [], | |
"internalDomainNameSuffix": "mla1d0xgqz2ulipwwxvrss1opd.ix.internal.cloudapp.net" | |
}, | |
"macAddress": "00-0D-3A-A1-EC-BE", | |
"enableAcceleratedNetworking": false, | |
"enableIPForwarding": false, | |
"networkSecurityGroup": { | |
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_db_vm_nsg_name'))]" | |
}, | |
"primary": true | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_db_vm_ip_name'))]", | |
"[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_IaaSNetwork_vnet_name'), parameters('subnets_db_subnet_name'))]", | |
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_db_vm_nsg_name'))]" | |
] | |
}, | |
{ | |
"comments": "NSG for App VM", | |
"type": "Microsoft.Network/networkSecurityGroups", | |
"name": "[parameters('networkSecurityGroups_app_vm_nsg_name')]", | |
"apiVersion": "2018-02-01", | |
"location": "southeastasia", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"resourceGuid": "645f2751-e0f3-44d0-a55c-c14be0b1775a", | |
"securityRules": [ | |
{ | |
"name": "SSH", | |
"etag": "W/\"331cfa0e-a2cb-405b-a1fa-846ec99c1533\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"protocol": "TCP", | |
"sourcePortRange": "*", | |
"destinationPortRange": "22", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 300, | |
"direction": "Inbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
} | |
], | |
"defaultSecurityRules": [ | |
{ | |
"name": "AllowVnetInBound", | |
"etag": "W/\"331cfa0e-a2cb-405b-a1fa-846ec99c1533\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Allow inbound traffic from all VMs in VNET", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "VirtualNetwork", | |
"destinationAddressPrefix": "VirtualNetwork", | |
"access": "Allow", | |
"priority": 65000, | |
"direction": "Inbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
}, | |
{ | |
"name": "AllowAzureLoadBalancerInBound", | |
"etag": "W/\"331cfa0e-a2cb-405b-a1fa-846ec99c1533\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Allow inbound traffic from azure load balancer", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "AzureLoadBalancer", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 65001, | |
"direction": "Inbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
}, | |
{ | |
"name": "DenyAllInBound", | |
"etag": "W/\"331cfa0e-a2cb-405b-a1fa-846ec99c1533\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Deny all inbound traffic", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Deny", | |
"priority": 65500, | |
"direction": "Inbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
}, | |
{ | |
"name": "AllowVnetOutBound", | |
"etag": "W/\"331cfa0e-a2cb-405b-a1fa-846ec99c1533\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Allow outbound traffic from all VMs to all VMs in VNET", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "VirtualNetwork", | |
"destinationAddressPrefix": "VirtualNetwork", | |
"access": "Allow", | |
"priority": 65000, | |
"direction": "Outbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
}, | |
{ | |
"name": "AllowInternetOutBound", | |
"etag": "W/\"331cfa0e-a2cb-405b-a1fa-846ec99c1533\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Allow outbound traffic from all VMs to Internet", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "Internet", | |
"access": "Allow", | |
"priority": 65001, | |
"direction": "Outbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
}, | |
{ | |
"name": "DenyAllOutBound", | |
"etag": "W/\"331cfa0e-a2cb-405b-a1fa-846ec99c1533\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Deny all outbound traffic", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Deny", | |
"priority": 65500, | |
"direction": "Outbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
} | |
] | |
}, | |
"dependsOn": [] | |
}, | |
{ | |
"comments": "NSG for DB VM", | |
"type": "Microsoft.Network/networkSecurityGroups", | |
"name": "[parameters('networkSecurityGroups_db_vm_nsg_name')]", | |
"apiVersion": "2018-02-01", | |
"location": "southeastasia", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"resourceGuid": "c760f8b2-3bb1-4945-8d9b-566b939983f0", | |
"securityRules": [ | |
{ | |
"name": "SSH", | |
"etag": "W/\"56753d2f-a01e-4d93-9984-25793d6f1008\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"protocol": "TCP", | |
"sourcePortRange": "*", | |
"destinationPortRange": "22", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 300, | |
"direction": "Inbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
} | |
], | |
"defaultSecurityRules": [ | |
{ | |
"name": "AllowVnetInBound", | |
"etag": "W/\"56753d2f-a01e-4d93-9984-25793d6f1008\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Allow inbound traffic from all VMs in VNET", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "VirtualNetwork", | |
"destinationAddressPrefix": "VirtualNetwork", | |
"access": "Allow", | |
"priority": 65000, | |
"direction": "Inbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
}, | |
{ | |
"name": "AllowAzureLoadBalancerInBound", | |
"etag": "W/\"56753d2f-a01e-4d93-9984-25793d6f1008\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Allow inbound traffic from azure load balancer", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "AzureLoadBalancer", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 65001, | |
"direction": "Inbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
}, | |
{ | |
"name": "DenyAllInBound", | |
"etag": "W/\"56753d2f-a01e-4d93-9984-25793d6f1008\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Deny all inbound traffic", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Deny", | |
"priority": 65500, | |
"direction": "Inbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
}, | |
{ | |
"name": "AllowVnetOutBound", | |
"etag": "W/\"56753d2f-a01e-4d93-9984-25793d6f1008\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Allow outbound traffic from all VMs to all VMs in VNET", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "VirtualNetwork", | |
"destinationAddressPrefix": "VirtualNetwork", | |
"access": "Allow", | |
"priority": 65000, | |
"direction": "Outbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
}, | |
{ | |
"name": "AllowInternetOutBound", | |
"etag": "W/\"56753d2f-a01e-4d93-9984-25793d6f1008\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Allow outbound traffic from all VMs to Internet", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "Internet", | |
"access": "Allow", | |
"priority": 65001, | |
"direction": "Outbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
}, | |
{ | |
"name": "DenyAllOutBound", | |
"etag": "W/\"56753d2f-a01e-4d93-9984-25793d6f1008\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"description": "Deny all outbound traffic", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Deny", | |
"priority": 65500, | |
"direction": "Outbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
} | |
} | |
] | |
}, | |
"dependsOn": [] | |
}, | |
{ | |
"comments": "Public IP for LB", | |
"type": "Microsoft.Network/publicIPAddresses", | |
"sku": { | |
"name": "Basic", | |
"tier": "Regional" | |
}, | |
"name": "[parameters('publicIPAddresses_app_lb_ip_name')]", | |
"apiVersion": "2018-02-01", | |
"location": "southeastasia", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"resourceGuid": "ae16b10d-40db-47b9-9d76-a82eb311b315", | |
"ipAddress": "104.215.153.236", | |
"publicIPAddressVersion": "IPv4", | |
"publicIPAllocationMethod": "Static", | |
"idleTimeoutInMinutes": 4, | |
"ipTags": [] | |
}, | |
"dependsOn": [] | |
}, | |
{ | |
"comments": "Public IP for App VM", | |
"type": "Microsoft.Network/publicIPAddresses", | |
"sku": { | |
"name": "Basic", | |
"tier": "Regional" | |
}, | |
"name": "[parameters('publicIPAddresses_app_vm_ip_name')]", | |
"apiVersion": "2018-02-01", | |
"location": "southeastasia", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"resourceGuid": "0ae93292-b58e-4623-9894-5293f50fb105", | |
"ipAddress": "104.215.199.57", | |
"publicIPAddressVersion": "IPv4", | |
"publicIPAllocationMethod": "Dynamic", | |
"idleTimeoutInMinutes": 4, | |
"ipTags": [] | |
}, | |
"dependsOn": [] | |
}, | |
{ | |
"comments": "Public IP for DB VM", | |
"type": "Microsoft.Network/publicIPAddresses", | |
"sku": { | |
"name": "Basic", | |
"tier": "Regional" | |
}, | |
"name": "[parameters('publicIPAddresses_db_vm_ip_name')]", | |
"apiVersion": "2018-02-01", | |
"location": "southeastasia", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"resourceGuid": "a7688ded-f30f-4727-ab67-a934bec77496", | |
"ipAddress": "13.76.40.117", | |
"publicIPAddressVersion": "IPv4", | |
"publicIPAllocationMethod": "Dynamic", | |
"idleTimeoutInMinutes": 4, | |
"ipTags": [] | |
}, | |
"dependsOn": [] | |
}, | |
{ | |
"comments": "The Virtual Network", | |
"type": "Microsoft.Network/virtualNetworks", | |
"name": "[parameters('virtualNetworks_IaaSNetwork_vnet_name')]", | |
"apiVersion": "2018-02-01", | |
"location": "southeastasia", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"resourceGuid": "eab1c162-86e6-4579-a1f6-b5eb194b6e7b", | |
"addressSpace": { | |
"addressPrefixes": [ | |
"10.1.1.0/24" | |
] | |
}, | |
"subnets": [ | |
{ | |
"name": "app-subnet", | |
"etag": "W/\"a4b31f3b-c105-4d2a-9640-c0b70521f6ac\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"addressPrefix": "10.1.1.0/26" | |
} | |
}, | |
{ | |
"name": "db-subnet", | |
"etag": "W/\"a4b31f3b-c105-4d2a-9640-c0b70521f6ac\"", | |
"properties": { | |
"provisioningState": "Succeeded", | |
"addressPrefix": "10.1.1.64/28", | |
"serviceEndpoints": [] | |
} | |
} | |
], | |
"virtualNetworkPeerings": [], | |
"enableDdosProtection": false, | |
"enableVmProtection": false | |
}, | |
"dependsOn": [] | |
}, | |
{ | |
"comments": "Security rule name for App VM", | |
"type": "Microsoft.Network/networkSecurityGroups/securityRules", | |
"name": "[concat(parameters('networkSecurityGroups_app_vm_nsg_name'), '/', parameters('securityRules_app_vm_SSH_name'))]", | |
"apiVersion": "2018-02-01", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"protocol": "TCP", | |
"sourcePortRange": "*", | |
"destinationPortRange": "22", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 300, | |
"direction": "Inbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_app_vm_nsg_name'))]" | |
] | |
}, | |
{ | |
"comments": "Security rule name for DB VM", | |
"type": "Microsoft.Network/networkSecurityGroups/securityRules", | |
"name": "[concat(parameters('networkSecurityGroups_db_vm_nsg_name'), '/', parameters('securityRules_db_vm_SSH_name'))]", | |
"apiVersion": "2018-02-01", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"protocol": "TCP", | |
"sourcePortRange": "*", | |
"destinationPortRange": "22", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 300, | |
"direction": "Inbound", | |
"sourcePortRanges": [], | |
"destinationPortRanges": [], | |
"sourceAddressPrefixes": [], | |
"destinationAddressPrefixes": [] | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_db_vm_nsg_name'))]" | |
] | |
}, | |
{ | |
"comments": "Subnet name for the App subnet", | |
"type": "Microsoft.Network/virtualNetworks/subnets", | |
"name": "[concat(parameters('virtualNetworks_IaaSNetwork_vnet_name'), '/', parameters('subnets_app_subnet_name'))]", | |
"apiVersion": "2018-02-01", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"addressPrefix": "10.1.1.0/26" | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_IaaSNetwork_vnet_name'))]" | |
] | |
}, | |
{ | |
"comments": "Subnet name for the DB subnet", | |
"type": "Microsoft.Network/virtualNetworks/subnets", | |
"name": "[concat(parameters('virtualNetworks_IaaSNetwork_vnet_name'), '/', parameters('subnets_db_subnet_name'))]", | |
"apiVersion": "2018-02-01", | |
"scale": null, | |
"properties": { | |
"provisioningState": "Succeeded", | |
"addressPrefix": "10.1.1.64/28", | |
"serviceEndpoints": [] | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_IaaSNetwork_vnet_name'))]" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment