Skip to content

Commit 6ffe307

Browse files
[Databricks] Support CMK (#12131)
* databricks * restore other files and update changelog * Update change log Co-authored-by: Dingmeng Xue <[email protected]>
1 parent 6df7af4 commit 6ffe307

File tree

80 files changed

+6816
-1671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+6816
-1671
lines changed

src/Databricks/Az.Databricks.format.ps1xml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,80 @@
3535
</TableRowEntries>
3636
</TableControl>
3737
</View>
38+
<View>
39+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.CreatedBy</Name>
40+
<ViewSelectedBy>
41+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.CreatedBy</TypeName>
42+
</ViewSelectedBy>
43+
<TableControl>
44+
<TableHeaders>
45+
<TableColumnHeader>
46+
<Label>ApplicationId</Label>
47+
</TableColumnHeader>
48+
<TableColumnHeader>
49+
<Label>Oid</Label>
50+
</TableColumnHeader>
51+
<TableColumnHeader>
52+
<Label>Puid</Label>
53+
</TableColumnHeader>
54+
</TableHeaders>
55+
<TableRowEntries>
56+
<TableRowEntry>
57+
<TableColumnItems>
58+
<TableColumnItem>
59+
<PropertyName>ApplicationId</PropertyName>
60+
</TableColumnItem>
61+
<TableColumnItem>
62+
<PropertyName>Oid</PropertyName>
63+
</TableColumnItem>
64+
<TableColumnItem>
65+
<PropertyName>Puid</PropertyName>
66+
</TableColumnItem>
67+
</TableColumnItems>
68+
</TableRowEntry>
69+
</TableRowEntries>
70+
</TableControl>
71+
</View>
72+
<View>
73+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.Encryption</Name>
74+
<ViewSelectedBy>
75+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.Encryption</TypeName>
76+
</ViewSelectedBy>
77+
<TableControl>
78+
<TableHeaders>
79+
<TableColumnHeader>
80+
<Label>KeyName</Label>
81+
</TableColumnHeader>
82+
<TableColumnHeader>
83+
<Label>KeySource</Label>
84+
</TableColumnHeader>
85+
<TableColumnHeader>
86+
<Label>KeyVaultUri</Label>
87+
</TableColumnHeader>
88+
<TableColumnHeader>
89+
<Label>KeyVersion</Label>
90+
</TableColumnHeader>
91+
</TableHeaders>
92+
<TableRowEntries>
93+
<TableRowEntry>
94+
<TableColumnItems>
95+
<TableColumnItem>
96+
<PropertyName>KeyName</PropertyName>
97+
</TableColumnItem>
98+
<TableColumnItem>
99+
<PropertyName>KeySource</PropertyName>
100+
</TableColumnItem>
101+
<TableColumnItem>
102+
<PropertyName>KeyVaultUri</PropertyName>
103+
</TableColumnItem>
104+
<TableColumnItem>
105+
<PropertyName>KeyVersion</PropertyName>
106+
</TableColumnItem>
107+
</TableColumnItems>
108+
</TableRowEntry>
109+
</TableRowEntries>
110+
</TableControl>
111+
</View>
38112
<View>
39113
<Name>Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.ErrorDetail</Name>
40114
<ViewSelectedBy>
@@ -103,6 +177,40 @@
103177
</TableRowEntries>
104178
</TableControl>
105179
</View>
180+
<View>
181+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.ManagedIdentityConfiguration</Name>
182+
<ViewSelectedBy>
183+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.ManagedIdentityConfiguration</TypeName>
184+
</ViewSelectedBy>
185+
<TableControl>
186+
<TableHeaders>
187+
<TableColumnHeader>
188+
<Label>PrincipalId</Label>
189+
</TableColumnHeader>
190+
<TableColumnHeader>
191+
<Label>TenantId</Label>
192+
</TableColumnHeader>
193+
<TableColumnHeader>
194+
<Label>Type</Label>
195+
</TableColumnHeader>
196+
</TableHeaders>
197+
<TableRowEntries>
198+
<TableRowEntry>
199+
<TableColumnItems>
200+
<TableColumnItem>
201+
<PropertyName>PrincipalId</PropertyName>
202+
</TableColumnItem>
203+
<TableColumnItem>
204+
<PropertyName>TenantId</PropertyName>
205+
</TableColumnItem>
206+
<TableColumnItem>
207+
<PropertyName>Type</PropertyName>
208+
</TableColumnItem>
209+
</TableColumnItems>
210+
</TableRowEntry>
211+
</TableRowEntries>
212+
</TableControl>
213+
</View>
106214
<View>
107215
<Name>Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.Operation</Name>
108216
<ViewSelectedBy>
@@ -405,6 +513,28 @@
405513
</TableRowEntries>
406514
</TableControl>
407515
</View>
516+
<View>
517+
<Name>Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.WorkspaceEncryptionParameter</Name>
518+
<ViewSelectedBy>
519+
<TypeName>Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.WorkspaceEncryptionParameter</TypeName>
520+
</ViewSelectedBy>
521+
<TableControl>
522+
<TableHeaders>
523+
<TableColumnHeader>
524+
<Label>Type</Label>
525+
</TableColumnHeader>
526+
</TableHeaders>
527+
<TableRowEntries>
528+
<TableRowEntry>
529+
<TableColumnItems>
530+
<TableColumnItem>
531+
<PropertyName>Type</PropertyName>
532+
</TableColumnItem>
533+
</TableColumnItems>
534+
</TableRowEntry>
535+
</TableRowEntries>
536+
</TableControl>
537+
</View>
408538
<View>
409539
<Name>Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.WorkspaceListResult</Name>
410540
<ViewSelectedBy>
@@ -434,6 +564,9 @@
434564
</ViewSelectedBy>
435565
<TableControl>
436566
<TableHeaders>
567+
<TableColumnHeader>
568+
<Label>CreatedDateTime</Label>
569+
</TableColumnHeader>
437570
<TableColumnHeader>
438571
<Label>ManagedResourceGroupId</Label>
439572
</TableColumnHeader>
@@ -443,10 +576,19 @@
443576
<TableColumnHeader>
444577
<Label>UiDefinitionUri</Label>
445578
</TableColumnHeader>
579+
<TableColumnHeader>
580+
<Label>WorkspaceId</Label>
581+
</TableColumnHeader>
582+
<TableColumnHeader>
583+
<Label>WorkspaceUrl</Label>
584+
</TableColumnHeader>
446585
</TableHeaders>
447586
<TableRowEntries>
448587
<TableRowEntry>
449588
<TableColumnItems>
589+
<TableColumnItem>
590+
<PropertyName>CreatedDateTime</PropertyName>
591+
</TableColumnItem>
450592
<TableColumnItem>
451593
<PropertyName>ManagedResourceGroupId</PropertyName>
452594
</TableColumnItem>
@@ -456,6 +598,12 @@
456598
<TableColumnItem>
457599
<PropertyName>UiDefinitionUri</PropertyName>
458600
</TableColumnItem>
601+
<TableColumnItem>
602+
<PropertyName>WorkspaceId</PropertyName>
603+
</TableColumnItem>
604+
<TableColumnItem>
605+
<PropertyName>WorkspaceUrl</PropertyName>
606+
</TableColumnItem>
459607
</TableColumnItems>
460608
</TableRowEntry>
461609
</TableRowEntries>

src/Databricks/Az.Databricks.psm1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@
2424
}
2525
}
2626
if(-not $accountsModule) {
27-
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.7.2' } | Measure-Object).Count -gt 0
27+
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.7.4' } | Measure-Object).Count -gt 0
2828
if($hasAdequateVersion) {
29-
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.7.2 -Scope Global -PassThru
29+
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.7.4 -Scope Global -PassThru
3030
}
3131
}
3232
}
3333

3434
if(-not $accountsModule) {
35-
Write-Error "`nThis module requires $accountsName version 1.7.2 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
36-
} elseif (($accountsModule.Version -lt [System.Version]'1.7.2') -and (-not $localAccounts)) {
37-
Write-Error "`nThis module requires $accountsName version 1.7.2 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
35+
Write-Error "`nThis module requires $accountsName version 1.7.4 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
36+
} elseif (($accountsModule.Version -lt [System.Version]'1.7.4') -and (-not $localAccounts)) {
37+
Write-Error "`nThis module requires $accountsName version 1.7.4 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
3838
}
3939
Write-Information "Loaded Module '$($accountsModule.Name)'"
4040

src/Databricks/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added support for customer-managed keys.
2122

2223
## Version 0.1.0
2324
* the first preview release

src/Databricks/check-dependencies.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ if(-not $Isolated) {
2121
return
2222
}
2323

24-
function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum) {
24+
function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) {
2525
if($predicate) {
2626
$module = Get-Module -ListAvailable -Name $moduleName
2727
if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0)) {
2828
$null = New-Item -ItemType Directory -Force -Path $path
2929
Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..."
30-
if($versionMinimum) {
30+
if ($requiredVersion) {
31+
Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path
32+
}elseif($versionMinimum) {
3133
Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path
3234
} else {
3335
Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path
@@ -44,8 +46,8 @@ if(Test-Path -Path $localModulesPath) {
4446
$env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
4547
}
4648

47-
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.7.2'
48-
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -versionMinimum ''
49+
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.7.4'
50+
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
4951

5052
$tools = Join-Path $PSScriptRoot 'tools'
5153
$resourceDir = Join-Path $tools 'Resources'

0 commit comments

Comments
 (0)