Created
April 14, 2017 21:41
-
-
Save esell/3659c392ada316f4f85388f91a4f4251 to your computer and use it in GitHub Desktop.
blah.json
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": { | |
"region_name": { | |
"defaultValue": "westus", | |
"type": "String" | |
}, | |
"apptier_nsg_name": { | |
"defaultValue": "apptier", | |
"type": "String" | |
}, | |
"dbtier_nsg_name": { | |
"defaultValue": "dbtier", | |
"type": "String" | |
}, | |
"vnet_name": { | |
"defaultValue": "changeme", | |
"type": "String" | |
}, | |
"vnet_prefix": { | |
"defaultValue": "10.0.0.0/16", | |
"type": "String" | |
}, | |
"apptier_prod_subnet_prefix": { | |
"defaultValue": "10.0.0.0/24", | |
"type": "String" | |
}, | |
"dbtier_prod_subnet_prefix": { | |
"defaultValue": "10.0.1.0/24", | |
"type": "String" | |
}, | |
"apptier_test_subnet_prefix": { | |
"defaultValue": "10.0.2.0/24", | |
"type": "String" | |
}, | |
"dbtier_test_subnet_prefix": { | |
"defaultValue": "10.0.3.0/24", | |
"type": "String" | |
}, | |
"apptier_dev_subnet_prefix": { | |
"defaultValue": "10.0.4.0/24", | |
"type": "String" | |
}, | |
"dbtier_dev_subnet_prefix": { | |
"defaultValue": "10.0.5.0/24", | |
"type": "String" | |
}, | |
"apptier_prod_int_lb_name": { | |
"defaultValue": "apptier_prod_int_lb", | |
"type": "String" | |
} | |
}, | |
"variables": {}, | |
"resources": [ | |
{ | |
"comments": "App Tier NSG", | |
"type": "Microsoft.Network/networkSecurityGroups", | |
"name": "[parameters('apptier_nsg_name')]", | |
"apiVersion": "2016-03-30", | |
"location": "[parameters('region_name')]", | |
"properties": { | |
"securityRules": [ | |
{ | |
"name": "SSH", | |
"properties": { | |
"protocol": "TCP", | |
"sourcePortRange": "*", | |
"destinationPortRange": "22", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 100, | |
"direction": "Inbound" | |
} | |
}, | |
{ | |
"name": "HTTP", | |
"properties": { | |
"protocol": "TCP", | |
"sourcePortRange": "*", | |
"destinationPortRange": "80", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 200, | |
"direction": "Inbound" | |
} | |
}, | |
{ | |
"name": "HTTPS", | |
"properties": { | |
"protocol": "TCP", | |
"sourcePortRange": "*", | |
"destinationPortRange": "443", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 300, | |
"direction": "Inbound" | |
} | |
} | |
] | |
}, | |
"dependsOn": [] | |
}, | |
{ | |
"comments": "Database Tier NSG", | |
"type": "Microsoft.Network/networkSecurityGroups", | |
"name": "[parameters('dbtier_nsg_name')]", | |
"apiVersion": "2016-03-30", | |
"location": "[parameters('region_name')]", | |
"properties": { | |
"securityRules": [ | |
{ | |
"name": "SSH", | |
"properties": { | |
"protocol": "TCP", | |
"sourcePortRange": "*", | |
"destinationPortRange": "22", | |
"sourceAddressPrefix": "*", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 100, | |
"direction": "Inbound" | |
} | |
}, | |
{ | |
"name": "MySQL", | |
"properties": { | |
"protocol": "TCP", | |
"sourcePortRange": "*", | |
"destinationPortRange": "3306", | |
"sourceAddressPrefix": "[parameters('apptier_prod_subnet_prefix')]", | |
"destinationAddressPrefix": "*", | |
"access": "Allow", | |
"priority": 200, | |
"direction": "Inbound" | |
} | |
} | |
] | |
}, | |
"dependsOn": [] | |
}, | |
{ | |
"comments": "Primary VNET", | |
"type": "Microsoft.Network/virtualNetworks", | |
"name": "[parameters('vnet_name')]", | |
"apiVersion": "2016-03-30", | |
"location": "[parameters('region_name')]", | |
"dependsOn": [ | |
"[concat('Microsoft.Network/networkSecurityGroups/', parameters('dbtier_nsg_name'))]", | |
"[concat('Microsoft.Network/networkSecurityGroups/', parameters('apptier_nsg_name'))]" | |
], | |
"properties": { | |
"addressSpace": { | |
"addressPrefixes": [ | |
"[parameters('vnet_prefix')]" | |
] | |
}, | |
"subnets": [ | |
{ | |
"name": "apptier-prod", | |
"properties": { | |
"addressPrefix": "[parameters('apptier_prod_subnet_prefix')]", | |
"networkSecurityGroup": { | |
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('apptier_nsg_name'))]" | |
} | |
} | |
}, | |
{ | |
"name": "dbtier-prod", | |
"properties": { | |
"addressPrefix": "[parameters('dbtier_prod_subnet_prefix')]", | |
"networkSecurityGroup": { | |
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('dbtier_nsg_name'))]" | |
} | |
} | |
}, | |
{ | |
"name": "apptier-test", | |
"properties": { | |
"addressPrefix": "[parameters('apptier_test_subnet_prefix')]", | |
"networkSecurityGroup": { | |
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('apptier_nsg_name'))]" | |
} | |
} | |
}, | |
{ | |
"name": "dbtier-test", | |
"properties": { | |
"addressPrefix": "[parameters('dbtier_test_subnet_prefix')]", | |
"networkSecurityGroup": { | |
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('dbtier_nsg_name'))]" | |
} | |
} | |
}, | |
{ | |
"name": "apptier-dev", | |
"properties": { | |
"addressPrefix": "[parameters('apptier_dev_subnet_prefix')]", | |
"networkSecurityGroup": { | |
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('apptier_nsg_name'))]" | |
} | |
} | |
}, | |
{ | |
"name": "dbtier-dev", | |
"properties": { | |
"addressPrefix": "[parameters('dbtier_dev_subnet_prefix')]", | |
"networkSecurityGroup": { | |
"id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('dbtier_nsg_name'))]" | |
} | |
} | |
} | |
] | |
}, | |
"dependsOn": [] | |
}, | |
{ | |
"comments": "App Tier Internal LB", | |
"type": "Microsoft.Network/loadBalancers", | |
"name": "[parameters('apptier_prod_int_lb_name')]", | |
"apiVersion": "2016-03-30", | |
"location": "[parameters('region_name')]", | |
"properties": { | |
"frontendIPConfigurations": [ | |
{ | |
"name": "LoadBalancerFrontEnd", | |
"properties": { | |
"privateIPAllocationMethod": "Dynamic", | |
"subnet": { | |
"id": "[concat(resourceId('Microsoft.Network/virtualNetworks', parameters('vnet_name')), '/subnets/apptier-prod')]" | |
} | |
} | |
} | |
], | |
"backendAddressPools": [], | |
"loadBalancingRules": [], | |
"probes": [], | |
"inboundNatRules": [], | |
"outboundNatRules": [], | |
"inboundNatPools": [] | |
}, | |
"dependsOn": [ | |
"[concat('Microsoft.Network/virtualNetworks/', parameters('vnet_name'))]" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment