Skip to content

Commit 3161347

Browse files
Add prepare subnet for SQL MI delegation
1 parent 2507a5e commit 3161347

2 files changed

Lines changed: 538 additions & 0 deletions

File tree

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Delegate subnet for Managed Instance deployment
2+
3+
Script that validates and prepares virtual network and subnet for Managed Instance creation to comply with [networking requirements](https://docs.microsoft.com/azure/sql-database/sql-database-managed-instance-vnet-configuration#requirements).
4+
5+
### Contents
6+
7+
[About this sample](#about-this-sample)<br/>
8+
[Before you begin](#before-you-begin)<br/>
9+
[Run this sample](#run-this-sample)<br/>
10+
[Sample details](#sample-details)<br/>
11+
[Disclaimers](#disclaimers)<br/>
12+
[Related links](#related-links)<br/>
13+
14+
15+
<a name=about-this-sample></a>
16+
17+
## About this sample
18+
19+
- **Applies to:** Azure SQL Database
20+
- **Key features:** Managed Instance
21+
- **Workload:** n/a
22+
- **Programming Language:** PowerShell
23+
- **Authors:** Srdan Bozovic
24+
- **Update history:** n/a
25+
26+
<a name=before-you-begin></a>
27+
28+
## Before you begin
29+
30+
To run this sample, you need the following prerequisites.
31+
32+
**Software prerequisites:**
33+
34+
1. PowerShell 5.1 or PowerShell Core 6.0
35+
2. Azure PowerShell Az module
36+
37+
**Azure prerequisites:**
38+
39+
1. Permission to manage Azure virtual network
40+
41+
<a name=run-this-sample></a>
42+
43+
## Run this sample
44+
45+
Run the script below from either Windows or Azure Cloud Shell
46+
47+
```powershell
48+
49+
$scriptUrlBase = 'https://raw.githubusercontent.com/Microsoft/sql-server-samples/master/samples/manage/azure-sql-db-managed-instance/delegate-subnet'
50+
51+
$parameters = @{
52+
subscriptionId = '<subscriptionId>'
53+
resourceGroupName = '<resourceGroupName>'
54+
virtualNetworkName = '<virtualNetworkName>'
55+
subnetName = '<subnetName>'
56+
}
57+
58+
Invoke-Command -ScriptBlock ([Scriptblock]::Create((iwr ($scriptUrlBase+'/delegateSubnet.ps1?t='+ [DateTime]::Now.Ticks)).Content)) -ArgumentList $parameters
59+
60+
```
61+
62+
<a name=sample-details></a>
63+
64+
## Sample details
65+
66+
This sample shows how to prepare Azure virtual network and subnet for Managed Instance deployment using PowerShell
67+
68+
This is done in three simple steps:
69+
- Validate - Selected virtual netwok and subnet are validated for Managed Instance networking requirements
70+
- Confirm - User is shown a set of changes that need to be made to prepare subnet for Managed Instance deployment and asked for consent
71+
- Prepare - Virtual network and subnet are configured properly
72+
73+
<a name=disclaimers></a>
74+
75+
## Disclaimers
76+
The scripts and this guide are copyright Microsoft Corporations and are provided as samples. They are not part of any Azure service and are not covered by any SLA or other Azure-related agreements. They are provided as-is with no warranties express or implied. Microsoft takes no responsibility for the use of the scripts or the accuracy of this document. Familiarize yourself with the scripts before using them.
77+
78+
<a name=related-links></a>
79+
80+
## Related Links
81+
<!-- Links to more articles. Remember to delete "en-us" from the link path. -->
82+
83+
For more information, see these articles:
84+
85+
- [What is a Managed Instance?](https://docs.microsoft.com/azure/sql-database/sql-database-managed-instance)
86+
- [Configure a VNet for Azure SQL Database Managed Instance](https://docs.microsoft.com/azure/sql-database/sql-database-managed-instance-vnet-configuration)

0 commit comments

Comments
 (0)