Skip to content

Commit b2d1cfd

Browse files
committed
[SQL] Add examples of Create Server and MI with TDE CMK
1 parent c5e438d commit b2d1cfd

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

src/Sql/Sql/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
- `Remove-AzSqlInstanceLink`
3333
- `Set-AzSqlInstanceLink`
3434
* Added support for DataWarehouse cross tenant and cross subscription restore operations to `Restore-AzSqlDatabase` cmdlet
35+
* Added examples for creating new SQL Server and Managed Instance with TDE CMK enabled to `New-AzSqlServer` and `New-AzSqlInstance` cmdlets
3536

3637
## Version 3.7.1
3738
* Deprecation of Get-AzSqlDatabaseTransparentDataEncryptionActivity cmdlet

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 "Primary UserManaged identity id" -UserAssignedIdentityId "UserManaged identity id" -KeyId "AzureKeyVault Uri"
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 : AzureKeyVault Uri
343+
PrimaryUserAssignedIdentityId : Primary UserManaged Identity id
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 "Primary UserManaged identity id" -UserAssignedIdentityId "UserManaged identity id" -KeyId "AzureKeyVault Uri"
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 : AzureKeyVault Uri
97+
PrimaryUserAssignedIdentityId : Primary UserManaged Identity id
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)