Skip to content

Commit 852ba4e

Browse files
viparekisra-fel
andauthored
[SQL] Add examples of Create Server and MI with TDE CMK (#17611)
* [SQL] Add examples of Create Server and MI with TDE CMK * address comments * Update ChangeLog.md Co-authored-by: Yeming Liu <[email protected]>
1 parent 3a61539 commit 852ba4e

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

src/Sql/Sql/help/New-AzSqlInstance.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,34 @@ ZoneRedundant : true
317317

318318
This command creates a new instance with external administrator properties and azure active directory only authentication enabled.
319319

320+
### Example 9: Create a new instance with TDE CMK
321+
```powershell
322+
New-AzSqlInstance -Name managedInstance1 -ResourceGroupName ResourceGroup01 -Location westcentralus -AdministratorCredential (Get-Credential) -SubnetId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" -LicenseType LicenseIncluded -StorageSizeInGB 1024 -VCore 16 -SkuName GP_Gen4 -DnsZonePartner "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/partnerServerForDnsZone" -AssignIdentity -IdentityType "UserAssigned" -PrimaryUserAssignedIdentityId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity01" -UserAssignedIdentityId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity01" -KeyId "https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901"
323+
```
324+
325+
```output
326+
Location : westcentralus
327+
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/managedInstance1
328+
ResourceGroupName : resourcegroup01
329+
ManagedInstanceName : managedInstance1
330+
Tags :
331+
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
332+
Sku : Microsoft.Azure.Management.Internal.Resources.Models.Sku
333+
FullyQualifiedDomainName : managedInstance1.wcusxxxxxxxxxxxxx.database.windows.net
334+
AdministratorLogin : adminLogin1
335+
AdministratorPassword :
336+
SubnetId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name
337+
LicenseType : LicenseIncluded
338+
VCores : 16
339+
StorageSizeInGB : 1024
340+
DnsZone : ad35cna0mw
341+
InstancePoolName :
342+
KeyId : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
343+
PrimaryUserAssignedIdentityId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity01
344+
```
345+
346+
This command creates a new managed instance with TDE CMK enabled.
347+
320348
## PARAMETERS
321349

322350
### -AdministratorCredential

src/Sql/Sql/help/New-AzSqlServer.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,26 @@ AzureADOnlyAuthentication : True
7979

8080
This command creates a version 12 Azure SQL Database server with external administrator properties and azure active directory only authentication enabled.
8181

82+
### Example 3: Create a new Azure SQL Database server with TDE CMK
83+
```powershell
84+
New-AzSqlServer -ResourceGroupName "ResourceGroup01" -Location "East US" -ServerName "server01" -ServerVersion "12.0" -SqlAdministratorCredentials (Get-Credential) -AssignIdentity -IdentityType "UserAssigned" -PrimaryUserAssignedIdentityId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity01" -UserAssignedIdentityId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity01" -KeyId "https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901"
85+
```
86+
87+
```output
88+
ResourceGroupName : resourcegroup01
89+
ServerName : server01
90+
Location : East US
91+
SqlAdministratorLogin : adminLogin
92+
SqlAdministratorPassword :
93+
ServerVersion : 12.0
94+
Tags :
95+
Identity : Microsoft.Azure.Management.Sql.Models.ResourceIdentity
96+
KeyId : https://contoso.vault.azure.net/keys/contosokey/01234567890123456789012345678901
97+
PrimaryUserAssignedIdentityId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity01
98+
```
99+
100+
This command creates a version 12 Azure SQL Database server with TDE CMK enabled.
101+
82102
## PARAMETERS
83103

84104
### -AsJob

0 commit comments

Comments
 (0)