Last active
October 16, 2018 09:39
-
-
Save andrewiankidd/6b76cc12cc869d0b912fc09f64bf999e to your computer and use it in GitHub Desktop.
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": { | |
"adminUsername": { | |
"type": "string", | |
"defaultValue": "admin" | |
}, | |
"adminPassword": { | |
"type": "securestring" | |
}, | |
"env_name": { | |
"defaultValue": "tst-dev", | |
"type": "String", | |
"metadata": { | |
"description": "Environment name to build structure on. Maximum of 7 characters." | |
} | |
}, | |
"location": { | |
"type": "string", | |
"metadata": { | |
"description": "Azure Location to publish the template to." | |
} | |
}, | |
"sslPass": { | |
"type": "string" | |
}, | |
"serverfarms_asp_tier": { | |
"defaultValue": "Isolated", | |
"type": "String" | |
}, | |
"serverfarms_asp_size": { | |
"defaultValue": "I1", | |
"type": "String" | |
}, | |
"appgateway_skuSize": { | |
"defaultValue": "WAF_Medium", | |
"type": "String" | |
}, | |
"appgateway_tier": { | |
"defaultValue": "WAF", | |
"type": "String" | |
}, | |
"appgateway_capacity": { | |
"defaultValue": 2, | |
"type": "int" | |
} | |
}, | |
"variables": { | |
"serverfarms_asp_name": "[concat(parameters('env_name'),'-asp')]", | |
"appsvcenv_name": "[concat(parameters('env_name'),'-ase')]", | |
"appsvcenv_nsg_name": "[concat(parameters('env_name'),'-ase-nsg')]", | |
"appsvcenv_routetable_name": "[concat(parameters('env_name'),'-ase-routetable')]", | |
"appsvcenv_subnet_name": "[concat(parameters('env_name'),'-ase-subnet')]", | |
"appsvcenv_backendsubnet_name": "[concat(parameters('env_name'),'-backend')]", | |
"appsvcenv_vnet_name": "[concat(parameters('env_name'),'-ase-vnet')]", | |
"appgateway_name": "[concat(parameters('env_name'),'-ag')]", | |
"appgateway_ip_dns_name": "[concat(parameters('env_name'),'-ag-ip')]", | |
"appgateway_id": "[resourceId('Microsoft.Network/applicationGateways', variables('appgateway_name'))]", | |
"externalHostNameDomain": "example.com", | |
"internalHostNameDomain": "example.local", | |
"sslData": "examplesslbase64data", | |
"azure_dns_ip": "1.1.1.1", | |
"sites_svc_client_name": "[concat(parameters('env_name'),'-svc-client')]", | |
"hostNameBindings_svc_client_name": "[concat(variables('sites_svc_client_name'), '.', variables('internalHostNameDomain'))]", | |
"hostNameBindings_svc_client_scm_name": "[concat(variables('sites_svc_client_name'), '.scm.', variables('internalHostNameDomain'))]", | |
"hostNameBindings_svc_client_ext_name": "[concat(variables('sites_svc_client_name'), '.', variables('externalHostNameDomain'))]", | |
"virtualMachines_vm_jbox_name": "[concat(parameters('env_name'),'-vm-jbox')]", | |
"networkInterfaces_vm_jbox_nic_name": "[concat(parameters('env_name'),'-vm-jbox-nic')]", | |
"storageAccounts_jbox_name": "[replace(variables('virtualMachines_vm_jbox_name'), '-', '')]", | |
"publicIPAddresses_vm_jbox_ip_name": "[concat(parameters('env_name'),'-vm-jbox-ip')]" | |
}, | |
"resources": [{ | |
"apiVersion": "2018-01-01", | |
"type": "Microsoft.Network/virtualNetworks", | |
"name": "[variables('appsvcenv_vnet_name')]", | |
"location": "[parameters('location')]", | |
"dependsOn": [ | |
"[concat('Microsoft.Network/networkSecurityGroups/', variables('appsvcenv_nsg_name'))]", | |
"[concat('Microsoft.Network/routeTables/', variables('appsvcenv_routetable_name'))]" | |
], | |
"properties": { | |
"addressSpace": { | |
"addressPrefixes": [ | |
"192.168.250.0/23" | |
] | |
}, | |
"dhcpOptions": { | |
"dnsServers": [ | |
"[variables('azure_dns_ip')]", | |
"8.8.8.8" | |
] | |
}, | |
"subnets": [{ | |
"name": "ApplicationGateway", | |
"properties": { | |
"addressPrefix": "192.168.250.0/26" | |
} | |
}, | |
{ | |
"name": "[variables('appsvcenv_backendsubnet_name')]", | |
"properties": { | |
"addressPrefix": "192.168.250.64/26", | |
"serviceEndpoints": [{ | |
"service": "Microsoft.Sql", | |
"locations": [ | |
"[parameters('location')]" | |
] | |
}] | |
} | |
}, | |
{ | |
"name": "[variables('appsvcenv_subnet_name')]", | |
"properties": { | |
"addressPrefix": "192.168.250.128/26", | |
"networkSecurityGroup": { | |
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('appsvcenv_nsg_name'))]" | |
}, | |
"routeTable": { | |
"id": "[resourceId('Microsoft.Network/routeTables', variables('appsvcenv_routetable_name'))]" | |
}, | |
"serviceEndpoints": [{ | |
"service": "Microsoft.Sql", | |
"locations": [ | |
"[parameters('location')]" | |
] | |
}] | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"apiVersion": "2015-06-15", | |
"type": "Microsoft.Network/routeTables", | |
"name": "[variables('appsvcenv_routetable_name')]", | |
"location": "[parameters('location')]", | |
"tags": { | |
"displayName": "UDR - Subnet" | |
}, | |
"properties": { | |
"routes": [{ | |
"name": "ak-dev-ase-route", | |
"properties": { | |
"addressPrefix": "0.0.0.0/0", | |
"nextHopType": "Internet" | |
} | |
}] | |
} | |
}, | |
{ | |
"apiVersion": "2015-06-15", | |
"type": "Microsoft.Network/networkSecurityGroups", | |
"name": "[variables('appsvcenv_nsg_name')]", | |
"location": "[parameters('location')]", | |
"tags": { | |
"displayName": "NSG - Subnet" | |
}, | |
"properties": { | |
"securityRules": [{ | |
"name": "Inbound-management", | |
"properties": { | |
"description": "Used to manage ASE from public VIP", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "454-455", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 100, | |
"direction": "Inbound" | |
} | |
}, | |
{ | |
"name": "ASE-internal-inbound", | |
"properties": { | |
"description": "ASE-internal-inbound", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "192.168.250.0/24", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 110, | |
"direction": "Inbound" | |
} | |
}, | |
{ | |
"name": "Inbound-HTTP", | |
"properties": { | |
"description": "Allow HTTP", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "80", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 120, | |
"direction": "Inbound" | |
} | |
}, | |
{ | |
"name": "Inbount-HTTPS", | |
"properties": { | |
"description": "Allow HTTPS", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "443", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 130, | |
"direction": "Inbound" | |
} | |
}, | |
{ | |
"name": "Inbound-FTP", | |
"properties": { | |
"description": "Allow FTP over port 21", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "21", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 140, | |
"direction": "Inbound" | |
} | |
}, | |
{ | |
"name": "Inbound-FTPS", | |
"properties": { | |
"description": "Allow FTPS", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "990", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 150, | |
"direction": "Inbound" | |
} | |
}, | |
{ | |
"name": "Inbound-FTP-Data", | |
"properties": { | |
"description": "RDP", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "10001-10020", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 160, | |
"direction": "Inbound" | |
} | |
}, | |
{ | |
"name": "Inbound-Remote-Debugging", | |
"properties": { | |
"description": "Visual Studio remote debugging", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "4016-4022", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 170, | |
"direction": "Inbound" | |
} | |
}, | |
{ | |
"name": "Outbound-443", | |
"properties": { | |
"description": "Azure Storage blob", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "443", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 100, | |
"direction": "Outbound" | |
} | |
}, | |
{ | |
"name": "Outbound-SMB", | |
"properties": { | |
"description": "Azure Storage queue", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "445", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 110, | |
"direction": "Outbound" | |
} | |
}, | |
{ | |
"name": "Outbound-DB", | |
"properties": { | |
"description": "Database", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "1433", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 120, | |
"direction": "Outbound" | |
} | |
}, | |
{ | |
"name": "Outbound-DB2", | |
"properties": { | |
"description": "Database 2", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "11000-11999", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 130, | |
"direction": "Outbound" | |
} | |
}, | |
{ | |
"name": "Outbound-DB3", | |
"properties": { | |
"description": "Database 3", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "14000-14999", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 140, | |
"direction": "Outbound" | |
} | |
}, | |
{ | |
"name": "Outbound-DNS", | |
"properties": { | |
"description": "DNS", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "53", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 150, | |
"direction": "Outbound" | |
} | |
}, | |
{ | |
"name": "ASE-internal-outbound", | |
"properties": { | |
"description": "Azure Storage queue", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "192.168.250.0/24", | |
"access": "Allow", | |
"priority": 160, | |
"direction": "Outbound" | |
} | |
}, | |
{ | |
"name": "Outbound-80", | |
"properties": { | |
"description": "Outbound 80", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "80", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 170, | |
"direction": "Outbound" | |
} | |
}, | |
{ | |
"name": "ASE-to-VNET", | |
"properties": { | |
"description": "ASE to VNET", | |
"protocol": "*", | |
"sourcePortRange": "*", | |
"destinationPortRange": "*", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "192.168.250.0/23", | |
"access": "Allow", | |
"priority": 180, | |
"direction": "Outbound" | |
} | |
} | |
] | |
} | |
}, | |
{ | |
"name": "[variables('appsvcenv_name')]", | |
"type": "Microsoft.Web/hostingEnvironments", | |
"properties": { | |
"name": "[variables('appsvcenv_name')]", | |
"location": "[parameters('location')]", | |
"VirtualNetwork": { | |
"id": "[resourceId('Microsoft.Network/virtualNetworks/', variables('appsvcenv_vnet_name'))]", | |
"Subnet": "[variables('appsvcenv_subnet_name')]" | |
}, | |
"dnsSuffix": "[variables('internalHostNameDomain')]", | |
"internalLoadBalancingMode": 3 | |
}, | |
"location": "[parameters('location')]", | |
"dependsOn": [ | |
"[concat('Microsoft.Network/virtualNetworks/', variables('appsvcenv_vnet_name'))]" | |
], | |
"apiVersion": "2015-02-01", | |
"kind": "ASEV2" | |
}, | |
{ | |
"name": "[variables('appgateway_name')]", | |
"type": "Microsoft.Network/applicationGateways", | |
"apiVersion": "2018-01-01", | |
"location": "[parameters('location')]", | |
"dependsOn": [ | |
"[concat('Microsoft.Network/publicIPAddresses/', variables('appgateway_ip_dns_name'))]", | |
"[concat('Microsoft.Network/virtualNetworks/', variables('appsvcenv_vnet_name'))]", | |
"[concat('Microsoft.Web/hostingEnvironments/', variables('appsvcenv_name'))]" | |
], | |
"properties": { | |
"sku": { | |
"name": "[parameters('appgateway_skuSize')]", | |
"tier": "[parameters('appgateway_tier')]", | |
"capacity": "[parameters('appgateway_capacity')]" | |
}, | |
"gatewayIPConfigurations": [{ | |
"name": "appGatewayIpConfig", | |
"properties": { | |
"subnet": { | |
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('appsvcenv_vnet_name'), 'ApplicationGateway')]" | |
} | |
} | |
}], | |
"sslCertificates": [{ | |
"name": "appGatewaySslCert", | |
"properties": { | |
"password": "[parameters('sslPass')]", | |
"data": "[variables('sslData')]" | |
} | |
}], | |
"frontendIPConfigurations": [{ | |
"name": "appGatewayFrontendIP", | |
"properties": { | |
"PublicIPAddress": { | |
"id": "[resourceId('Microsoft.Network/publicIPAddresses/', variables('appgateway_ip_dns_name'))]" | |
} | |
} | |
}], | |
"frontendPorts": [{ | |
"name": "appGatewayPort80", | |
"properties": { | |
"Port": 80 | |
} | |
}, | |
{ | |
"name": "appGatewayPort443", | |
"properties": { | |
"Port": 443 | |
} | |
} | |
], | |
"backendAddressPools": [{ | |
"name": "appGatewayBackendPool", | |
"properties": { | |
"backendAddresses": [{ | |
"ipAddress": "192.168.250.139" | |
}] | |
} | |
}], | |
"backendHttpSettingsCollection": [{ | |
"name": "appGatewayBackendHttpSettings", | |
"properties": { | |
"Port": 80, | |
"Protocol": "Http", | |
"CookieBasedAffinity": "Disabled", | |
"pickHostNameFromBackendAddress": false, | |
"requestTimeout": 300, | |
"probe": { | |
"id": "[concat(variables('appgateway_id'), '/probes/appGatewayHealthProbe')]" | |
} | |
} | |
}], | |
"httpListeners": [{ | |
"name": "appGatewayHttpsListener", | |
"properties": { | |
"FrontendIPConfiguration": { | |
"Id": "[concat(variables('appgateway_id'), '/frontendIPConfigurations/appGatewayFrontendIP')]" | |
}, | |
"FrontendPort": { | |
"Id": "[concat(variables('appgateway_id'), '/frontendPorts/appGatewayPort443')]" | |
}, | |
"sslCertificate": { | |
"Id": "[concat(variables('appgateway_id'), '/sslCertificates/appGatewaySslCert')]" | |
}, | |
"Protocol": "Https", | |
"requireServerNameIndication": false | |
} | |
}, | |
{ | |
"name": "appGatewayHttpListener", | |
"properties": { | |
"FrontendIPConfiguration": { | |
"Id": "[concat(variables('appgateway_id'), '/frontendIPConfigurations/appGatewayFrontendIP')]" | |
}, | |
"FrontendPort": { | |
"Id": "[concat(variables('appgateway_id'), '/frontendPorts/appGatewayPort80')]" | |
}, | |
"Protocol": "Http", | |
"requireServerNameIndication": false | |
} | |
} | |
], | |
"requestRoutingRules": [{ | |
"Name": "appGatewayHttpsRule", | |
"properties": { | |
"RuleType": "Basic", | |
"httpListener": { | |
"id": "[concat(variables('appgateway_id'), '/httpListeners/appGatewayHttpsListener')]" | |
}, | |
"backendAddressPool": { | |
"id": "[concat(variables('appgateway_id'), '/backendAddressPools/appGatewayBackendPool')]" | |
}, | |
"backendHttpSettings": { | |
"id": "[concat(variables('appgateway_id'), '/backendHttpSettingsCollection/appGatewayBackendHttpSettings')]" | |
} | |
} | |
}, | |
{ | |
"Name": "appGatewayHttpRule", | |
"properties": { | |
"RuleType": "Basic", | |
"httpListener": { | |
"id": "[concat(variables('appgateway_id'), '/httpListeners/appGatewayHttpListener')]" | |
}, | |
"backendAddressPool": { | |
"id": "[concat(variables('appgateway_id'), '/backendAddressPools/appGatewayBackendPool')]" | |
}, | |
"backendHttpSettings": { | |
"id": "[concat(variables('appgateway_id'), '/backendHttpSettingsCollection/appGatewayBackendHttpSettings')]" | |
} | |
} | |
} | |
], | |
"webApplicationFirewallConfiguration": { | |
"enabled": true, | |
"firewallMode": "Detection", | |
"ruleSetType": "OWASP", | |
"ruleSetVersion": "3.0" | |
}, | |
"probes": [{ | |
"name": "appGatewayHealthProbe", | |
"properties": { | |
"protocol": "Http", | |
"host": "[variables('hostNameBindings_svc_client_name')]", | |
"path": "/", | |
"interval": 30, | |
"timeout": 30, | |
"unhealthyThreshold": 3, | |
"pickHostNameFromBackendHttpSettings": false, | |
"minServers": 0, | |
"match": {} | |
} | |
}] | |
} | |
}, | |
{ | |
"apiVersion": "2017-08-01", | |
"type": "Microsoft.Network/publicIPAddresses", | |
"name": "[variables('appgateway_ip_dns_name')]", | |
"location": "[parameters('location')]", | |
"sku": { | |
"name": "Basic" | |
}, | |
"properties": { | |
"publicIPAllocationMethod": "Dynamic", | |
"idleTimeoutInMinutes": "4", | |
"dnsSettings": { | |
"domainNameLabel": "[variables('appgateway_name')]" | |
} | |
} | |
}, | |
{ | |
"name": "[variables('virtualMachines_vm_jbox_name')]", | |
"type": "Microsoft.Compute/virtualMachines", | |
"apiVersion": "2017-03-30", | |
"location": "[parameters('location')]", | |
"dependsOn": [ | |
"[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaces_vm_jbox_nic_name'))]" | |
], | |
"properties": { | |
"osProfile": { | |
"computerName": "[variables('virtualMachines_vm_jbox_name')]", | |
"adminUsername": "[parameters('adminUsername')]", | |
"adminPassword": "[parameters('adminPassword')]", | |
"windowsConfiguration": { | |
"provisionVmAgent": "true" | |
} | |
}, | |
"hardwareProfile": { | |
"vmSize": "Standard_B2ms" | |
}, | |
"storageProfile": { | |
"imageReference": { | |
"publisher": "MicrosoftWindowsServer", | |
"offer": "WindowsServer", | |
"sku": "2016-Datacenter", | |
"version": "latest" | |
}, | |
"osDisk": { | |
"createOption": "fromImage", | |
"managedDisk": { | |
"storageAccountType": "Premium_LRS" | |
} | |
}, | |
"dataDisks": [] | |
}, | |
"networkProfile": { | |
"networkInterfaces": [{ | |
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaces_vm_jbox_nic_name'))]" | |
}] | |
}, | |
"diagnosticsProfile": { | |
"bootDiagnostics": { | |
"enabled": false | |
} | |
} | |
} | |
}, | |
{ | |
"name": "[variables('storageAccounts_jbox_name')]", | |
"type": "Microsoft.Storage/storageAccounts", | |
"apiVersion": "2015-06-15", | |
"location": "[parameters('location')]", | |
"kind": "Storage", | |
"properties": { | |
"accountType": "Standard_LRS" | |
} | |
}, | |
{ | |
"name": "[variables('networkInterfaces_vm_jbox_nic_name')]", | |
"type": "Microsoft.Network/networkInterfaces", | |
"apiVersion": "2016-09-01", | |
"location": "[parameters('location')]", | |
"properties": { | |
"ipConfigurations": [{ | |
"name": "ipconfig1", | |
"properties": { | |
"publicIPAddress": { | |
"id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddresses_vm_jbox_ip_name'))]" | |
}, | |
"subnet": { | |
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('appsvcenv_vnet_name'), variables('appsvcenv_backendsubnet_name'))]" | |
} | |
} | |
}] | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddresses_vm_jbox_ip_name'))]", | |
"[concat('Microsoft.Network/VirtualNetworks/', variables('appsvcenv_vnet_name'))]" | |
] | |
}, | |
{ | |
"name": "[variables('publicIPAddresses_vm_jbox_ip_name')]", | |
"type": "Microsoft.Network/publicIpAddresses", | |
"apiVersion": "2017-08-01", | |
"location": "[parameters('location')]", | |
"properties": { | |
"publicIPAddressVersion": "IPv4", | |
"publicIPAllocationMethod": "Dynamic", | |
"idleTimeoutInMinutes": 4, | |
"dnsSettings": { | |
"domainNameLabel": "[concat(parameters('env_name'),'-vm-jbox')]" | |
} | |
}, | |
"sku": { | |
"name": "Basic" | |
} | |
}, | |
{ | |
"type": "Microsoft.Compute/virtualMachines/extensions", | |
"name": "[concat(variables('virtualMachines_vm_jbox_name'), '/ConfigMSDeploy')]", | |
"apiVersion": "2017-03-30", | |
"location": "[parameters('location')]", | |
"properties": { | |
"publisher": "Microsoft.Compute", | |
"type": "CustomScriptExtension", | |
"typeHandlerVersion": "1.4", | |
"autoUpgradeMinorVersion": true, | |
"settings": { | |
"fileUris": [ | |
"https://raw.githubusercontent.com/andrewiankidd/AzureArtifacts/master/webDeploy.ps1" | |
] | |
}, | |
"protectedSettings": { | |
"commandToExecute": "[concat('powershell -ExecutionPolicy Unrestricted -file webDeploy.ps1 -fqdn ', parameters('env_name'), '-vm-jbox.', parameters('location'), '.cloudapp.azure.com')]" | |
} | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Compute/virtualMachines', variables('virtualMachines_vm_jbox_name'))]" | |
] | |
}, | |
{ | |
"type": "Microsoft.Sql/servers/virtualNetworkRules", | |
"name": "[concat(variables('servers_sql_name'), '/sql-rule')]", | |
"apiVersion": "2015-05-01-preview", | |
"scale": null, | |
"properties": { | |
"virtualNetworkSubnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('appsvcenv_vnet_name'), variables('appsvcenv_subnet_name'))]" | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Sql/servers', variables('servers_sql_name'))]" | |
] | |
}, | |
{ | |
"type": "Microsoft.Sql/servers/virtualNetworkRules", | |
"name": "[concat(variables('servers_sql_name'), '/backend-sql-rule')]", | |
"apiVersion": "2015-05-01-preview", | |
"scale": null, | |
"properties": { | |
"virtualNetworkSubnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('appsvcenv_vnet_name'), variables('appsvcenv_backendsubnet_name'))]" | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Sql/servers', variables('servers_sql_name'))]" | |
] | |
}, | |
{ | |
"type": "Microsoft.Web/serverfarms", | |
"sku": { | |
"name": "[parameters('serverfarms_asp_size')]", | |
"tier": "[parameters('serverfarms_asp_tier')]" | |
}, | |
"name": "[variables('serverfarms_asp_name')]", | |
"apiVersion": "2016-09-01", | |
"location": "[parameters('location')]", | |
"properties": { | |
"hostingEnvironment": "[variables('appsvcenv_name')]", | |
"name": "[variables('serverfarms_asp_name')]", | |
"targetWorkerSizeId": 0 | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/hostingEnvironments', variables('appsvcenv_name'))]" | |
] | |
}, | |
{ | |
"type": "Microsoft.Web/sites", | |
"kind": "app", | |
"name": "[variables('sites_svc_client_name')]", | |
"apiVersion": "2016-08-01", | |
"location": "[parameters('location')]", | |
"properties": { | |
"enabled": true, | |
"hostNameSslStates": [{ | |
"name": "[variables('hostNameBindings_svc_client_name')]", | |
"sslState": "Disabled", | |
"hostType": "Standard" | |
}, | |
{ | |
"name": "[variables('hostNameBindings_svc_client_scm_name')]", | |
"sslState": "Disabled", | |
"hostType": "Repository" | |
} | |
], | |
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('serverfarms_asp_name'))]", | |
"clientAffinityEnabled": true | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/serverfarms', variables('serverfarms_asp_name'))]" | |
] | |
}, | |
{ | |
"type": "Microsoft.Web/sites/config", | |
"name": "[concat(variables('sites_svc_client_name'), '/web')]", | |
"apiVersion": "2016-08-01", | |
"location": "[parameters('location')]", | |
"properties": { | |
"numberOfWorkers": 1, | |
"defaultDocuments": [ | |
"Default.htm", | |
"Default.html", | |
"Default.asp", | |
"index.htm", | |
"index.html", | |
"iisstart.htm", | |
"default.aspx", | |
"index.php", | |
"hostingstart.html" | |
], | |
"netFrameworkVersion": "v4.0", | |
"phpVersion": "5.6", | |
"remoteDebuggingVersion": "VS2012", | |
"logsDirectorySizeLimit": 35, | |
"publishingUsername": "[concat('$', variables('sites_svc_client_name'))]", | |
"scmType": "None", | |
"use32BitWorkerProcess": true, | |
"managedPipelineMode": "Integrated", | |
"virtualApplications": [{ | |
"virtualPath": "/", | |
"physicalPath": "site\\wwwroot" | |
} | |
], | |
"loadBalancing": "LeastRequests" | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/sites', variables('sites_svc_client_name'))]" | |
] | |
}, | |
{ | |
"type": "Microsoft.Web/sites/hostNameBindings", | |
"name": "[concat(variables('sites_svc_client_name'), '/', variables('hostNameBindings_svc_client_name'))]", | |
"apiVersion": "2016-08-01", | |
"location": "[parameters('location')]", | |
"properties": { | |
"siteName": "[variables('sites_svc_client_name')]", | |
"hostNameType": "Verified" | |
}, | |
"dependsOn": [ | |
"[resourceId('Microsoft.Web/sites', variables('sites_svc_client_name'))]" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment