Skip to content

Commit

Permalink
Merge pull request Azure#4847 from jovanpop-msft/master
Browse files Browse the repository at this point in the history
Azure SQL Database Managed Instance Azure Environment
  • Loading branch information
bmoore-msft authored Jul 3, 2018
2 parents a1863c2 + 3b070f8 commit 940c1f8
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 0 deletions.
26 changes: 26 additions & 0 deletions 101-sql-managed-instance-azure-environment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SQL Managed Instance Virtual Network Environment

<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-sql-managed-instance-azure-environment%2Fazuredeploy.json" target="_blank">
<img src="http://azuredeploy.net/deploybutton.png"/>
</a>
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-sql-managed-instance-azure-environment%2Fazuredeploy.json" target="_blank">
<img src="http://armviz.io/visualizebutton.png"/>
</a>

This template allows you to create an Azure networking environment required to deploy [Azure SQL Database Managed Instances](https://docs.microsoft.com/en-us/azure/sql-database/sql-database-managed-instance) - fully managed SQL Server Database Engine hosted in the Azure cloud.

`Tags: Azure, SqlDb, Managed Instance, VNet`

## Solution overview and deployed resources

This deployment will create a configured Azure Virtual Network with two subnets - one that will be dedicated to your SQL Managed Instances,
and the another one where you can place other resources (for example VMs, App Service environments, etc.). This is a properly
configured networking environment where you can deploy Azure SQL Database Managed Instances.

## Deployment steps

You can click the "deploy to Azure" button at the beginning of this document or follow the instructions for command line deployment using the scripts in the root of this repo, and populate following parameters:
- Name of the Azure Virtual Network that will be created and configured, including the address range that will be associated to this VNet. Default address range is 10.0.0.0/16 but you should probably change it to fit your needs.
- Name of the default subnet where you can place the resources other than Managed Instances. The name will be "Default", if you don't want to change it. This is the subnet where you will place VMs or web apps that should access Managed Instances in your VNet. You should also enter address range that should be associated to this network. If you don't need any other resources in your VNet you can delete this subnet later.
- Name of the subnet that will be dedicated to Managed Instances placed in your VNet including the subnet address range (this is Azure SQL Managed Instance specific requirement). Choose carefully the subnet address range because it depends on the number of instances that you would like to place in the subnet. You would need at least two addresses per every General Purpose Managed Instance that you want to deploy in the subnet.
- Name of the route table that will enable Managed Instance in the subnet to communicate with the Azure Management service that controls them. If the route table with the specified name doesn't exist the new one will be created and configured, otherwise the existing one will be used. The recommendation is to create one route table and don't change it.
114 changes: 114 additions & 0 deletions 101-sql-managed-instance-azure-environment/azuredeploy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"virtualNetworkName": {
"type": "string",
"defaultValue": "MyNewVNet",
"metadata": {
"description": "The name of new Azure VNet where you can deploy Azure Sql Managed Instances and the resources that use them"
}
},
"virtualNetworkAddressPrefix": {
"type": "string",
"defaultValue": "10.0.0.0/16",
"metadata": {
"description": "VNet IP address range (VNet prefix)"
}
},
"defaultSubnetName": {
"type": "string",
"defaultValue": "Default",
"metadata": {
"description": "The name of default subnet for VNet (used to deploy VMs, web, and other client apps - no Managed Instances). You can delete this subnet later if you don't need it."
}
},
"defaultSubnetPrefix": {
"type": "string",
"defaultValue": "10.0.0.0/24",
"metadata": {
"description": "Default subnet address range (subnet prefix)"
}
},
"managedInstanceSubnetName": {
"type": "string",
"defaultValue": "ManagedInstances",
"metadata": {
"description": "The name of the subnet dedicated to Azure SQL Managed Instances"
}
},
"managedInstanceSubnetPrefix": {
"type": "string",
"defaultValue": "10.0.1.0/24",
"metadata": {
"description": "IP Address range in the subnet dedicated to Azure SQL Managed Instances"
}
},
"routeTableToAzureService": {
"type": "string",
"defaultValue": "RouteToAzureSqlMiMngSvc",
"metadata": {
"description": "The name of the existing or new route table that enables access to Azure SQL Managed Instance Management Service that controls the instance, manages backups and other maintenance operations"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Azure data center location where all resources will be deployed"
}
}
},
"variables": {},
"resources": [
{
"apiVersion": "2018-02-01",
"type": "Microsoft.Network/virtualNetworks",
"name": "[parameters('virtualNetworkName')]",
"location": "[parameters('location')]",
"dependsOn": ["[resourceId('Microsoft.Network/routeTables', parameters('routeTableToAzureService'))]"],
"properties": {
"addressSpace": {
"addressPrefixes": [
"[parameters('virtualNetworkAddressPrefix')]"
]
},
"subnets": [
{
"name": "[parameters('defaultSubnetName')]",
"properties": {
"addressPrefix": "[parameters('defaultSubnetPrefix')]"
}
},
{
"name": "[parameters('managedInstanceSubnetName')]",
"properties": {
"addressPrefix": "[parameters('managedInstanceSubnetPrefix')]",
"routeTable": {
"id": "[resourceId('Microsoft.Network/routeTables', parameters('routeTableToAzureService'))]"
}
}
}
]
}
},
{
"type": "Microsoft.Network/routeTables",
"name": "[parameters('routeTableToAzureService')]",
"apiVersion": "2018-02-01",
"location": "[parameters('location')]",
"properties": {
"disableBgpRoutePropagation": false,
"routes": [
{
"name": "[parameters('routeTableToAzureService')]",
"properties": {
"addressPrefix": "0.0.0.0/0",
"nextHopType": "Internet"
}
}
]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"virtualNetworkName": {
"value": "GEN-UNIQUE"
}
}
}
9 changes: 9 additions & 0 deletions 101-sql-managed-instance-azure-environment/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://aka.ms/azure-quickstart-templates-metadata-schema#",
"itemDisplayName": "Environment required to deploy Azure SQL Managed Instance.",
"description": "This template allows you to create an environment required to deploy Azure SQL Managed Instance - Virtual Network with two subnets.",
"summary": "Create a Virtual Network with two Subnets. One dedicated to SQL Managed Instances and other default for other resources",
"githubUsername": "jovanpop-msft",
"dateUpdated": "2018-07-01"
}

0 comments on commit 940c1f8

Please sign in to comment.