Skip to content

Commit

Permalink
feat: Add security compliance options for `avm/res/databricks/workspa…
Browse files Browse the repository at this point in the history
…ce` (#3550)

## Description

Added options to enable Security and Compliance for databricks
workspaces.
### *EnhancedSecurityComplianceDefinition*
Name | Description | Value
-- | -- | --
automaticClusterUpdate | Status of automated cluster updates feature. |
AutomaticClusterUpdateDefinition
complianceSecurityProfile | Status of Compliance Security Profile
feature. | ComplianceSecurityProfileDefinition
enhancedSecurityMonitoring | Status of Enhanced Security Monitoring
feature. | EnhancedSecurityMonitoringDefinition


<!--
>Thank you for your contribution !
> Please include a summary of the change and which issue is fixed.
> Please also include the context.
> List any dependencies that are required for this change.

Closes #3515 

-->

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.databricks.workspace](https://github.com/clintgrove/bicep-registry-modules/actions/workflows/avm.res.databricks.workspace.yml/badge.svg?branch=3515-addSecurityComplianc)](https://github.com/clintgrove/bicep-registry-modules/actions/workflows/avm.res.databricks.workspace.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [x] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [x] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [x] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->
Name	Description	Value
automaticClusterUpdate Status of automated cluster updates feature.
[AutomaticClusterUpdateDefinition](https://learn.microsoft.com/en-us/azure/templates/microsoft.databricks/workspaces?pivots=deployment-language-bicep#automaticclusterupdatedefinition)
complianceSecurityProfile Status of Compliance Security Profile feature.
[ComplianceSecurityProfileDefinition](https://learn.microsoft.com/en-us/azure/templates/microsoft.databricks/workspaces?pivots=deployment-language-bicep#compliancesecurityprofiledefinition)
enhancedSecurityMonitoring Status of Enhanced Security Monitoring
feature.
[EnhancedSecurityMonitoringDefinition](https://learn.microsoft.com/en-us/azure/templates/microsoft.databricks/workspaces?pivots=deployment-language-bicep#enhancedsecuritymonitoringdefinition)
  • Loading branch information
clintgrove authored Oct 15, 2024
1 parent f850625 commit 0b236a5
Show file tree
Hide file tree
Showing 5 changed files with 199 additions and 2 deletions.
104 changes: 104 additions & 0 deletions avm/res/databricks/workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ module workspace 'br/public:avm/res/databricks/workspace:<version>' = {
name: 'dwmax002'
// Non-required parameters
amlWorkspaceResourceId: '<amlWorkspaceResourceId>'
automaticClusterUpdate: 'Enabled'
complianceSecurityProfileValue: 'Enabled'
complianceStandards: [
'HIPAA'
'PCI_DSS'
]
customerManagedKey: {
keyName: '<keyName>'
keyVaultResourceId: '<keyVaultResourceId>'
Expand Down Expand Up @@ -149,6 +155,7 @@ module workspace 'br/public:avm/res/databricks/workspace:<version>' = {
}
]
disablePublicIp: true
enhancedSecurityMonitoring: 'Enabled'
loadBalancerBackendPoolName: '<loadBalancerBackendPoolName>'
loadBalancerResourceId: '<loadBalancerResourceId>'
location: '<location>'
Expand Down Expand Up @@ -243,6 +250,18 @@ module workspace 'br/public:avm/res/databricks/workspace:<version>' = {
"amlWorkspaceResourceId": {
"value": "<amlWorkspaceResourceId>"
},
"automaticClusterUpdate": {
"value": "Enabled"
},
"complianceSecurityProfileValue": {
"value": "Enabled"
},
"complianceStandards": {
"value": [
"HIPAA",
"PCI_DSS"
]
},
"customerManagedKey": {
"value": {
"keyName": "<keyName>",
Expand Down Expand Up @@ -292,6 +311,9 @@ module workspace 'br/public:avm/res/databricks/workspace:<version>' = {
"disablePublicIp": {
"value": true
},
"enhancedSecurityMonitoring": {
"value": "Enabled"
},
"loadBalancerBackendPoolName": {
"value": "<loadBalancerBackendPoolName>"
},
Expand Down Expand Up @@ -416,6 +438,12 @@ using 'br/public:avm/res/databricks/workspace:<version>'
param name = 'dwmax002'
// Non-required parameters
param amlWorkspaceResourceId = '<amlWorkspaceResourceId>'
param automaticClusterUpdate = 'Enabled'
param complianceSecurityProfileValue = 'Enabled'
param complianceStandards = [
'HIPAA'
'PCI_DSS'
]
param customerManagedKey = {
keyName: '<keyName>'
keyVaultResourceId: '<keyVaultResourceId>'
Expand Down Expand Up @@ -449,6 +477,7 @@ param diagnosticSettings = [
}
]
param disablePublicIp = true
param enhancedSecurityMonitoring = 'Enabled'
param loadBalancerBackendPoolName = '<loadBalancerBackendPoolName>'
param loadBalancerResourceId = '<loadBalancerResourceId>'
param location = '<location>'
Expand Down Expand Up @@ -542,6 +571,8 @@ module workspace 'br/public:avm/res/databricks/workspace:<version>' = {
// Non-required parameters
accessConnectorResourceId: '<accessConnectorResourceId>'
amlWorkspaceResourceId: '<amlWorkspaceResourceId>'
automaticClusterUpdate: 'Enabled'
complianceSecurityProfileValue: 'Disabled'
customerManagedKey: {
keyName: '<keyName>'
keyVaultResourceId: '<keyVaultResourceId>'
Expand Down Expand Up @@ -572,6 +603,7 @@ module workspace 'br/public:avm/res/databricks/workspace:<version>' = {
}
]
disablePublicIp: true
enhancedSecurityMonitoring: 'Enabled'
loadBalancerBackendPoolName: '<loadBalancerBackendPoolName>'
loadBalancerResourceId: '<loadBalancerResourceId>'
location: '<location>'
Expand Down Expand Up @@ -657,6 +689,12 @@ module workspace 'br/public:avm/res/databricks/workspace:<version>' = {
"amlWorkspaceResourceId": {
"value": "<amlWorkspaceResourceId>"
},
"automaticClusterUpdate": {
"value": "Enabled"
},
"complianceSecurityProfileValue": {
"value": "Disabled"
},
"customerManagedKey": {
"value": {
"keyName": "<keyName>",
Expand Down Expand Up @@ -701,6 +739,9 @@ module workspace 'br/public:avm/res/databricks/workspace:<version>' = {
"disablePublicIp": {
"value": true
},
"enhancedSecurityMonitoring": {
"value": "Enabled"
},
"loadBalancerBackendPoolName": {
"value": "<loadBalancerBackendPoolName>"
},
Expand Down Expand Up @@ -816,6 +857,8 @@ param name = 'dwwaf001'
// Non-required parameters
param accessConnectorResourceId = '<accessConnectorResourceId>'
param amlWorkspaceResourceId = '<amlWorkspaceResourceId>'
param automaticClusterUpdate = 'Enabled'
param complianceSecurityProfileValue = 'Disabled'
param customerManagedKey = {
keyName: '<keyName>'
keyVaultResourceId: '<keyVaultResourceId>'
Expand Down Expand Up @@ -846,6 +889,7 @@ param diagnosticSettings = [
}
]
param disablePublicIp = true
param enhancedSecurityMonitoring = 'Enabled'
param loadBalancerBackendPoolName = '<loadBalancerBackendPoolName>'
param loadBalancerResourceId = '<loadBalancerResourceId>'
param location = '<location>'
Expand Down Expand Up @@ -928,6 +972,9 @@ param vnetAddressPrefix = '10.100'
| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`amlWorkspaceResourceId`](#parameter-amlworkspaceresourceid) | string | The resource ID of a Azure Machine Learning workspace to link with Databricks workspace. |
| [`automaticClusterUpdate`](#parameter-automaticclusterupdate) | string | The value for enabling automatic cluster updates in enhanced security compliance. |
| [`complianceSecurityProfileValue`](#parameter-compliancesecurityprofilevalue) | string | The value to Enable or Disable for the compliance security profile. |
| [`complianceStandards`](#parameter-compliancestandards) | array | The compliance standards array for the security profile. Should be a list of compliance standards like "HIPAA", "NONE" or "PCI_DSS". |
| [`customerManagedKey`](#parameter-customermanagedkey) | object | The customer managed key definition to use for the managed service. |
| [`customerManagedKeyManagedDisk`](#parameter-customermanagedkeymanageddisk) | object | The customer managed key definition to use for the managed disk. |
| [`customPrivateSubnetName`](#parameter-customprivatesubnetname) | string | The name of the Private Subnet within the Virtual Network. |
Expand All @@ -937,6 +984,7 @@ param vnetAddressPrefix = '10.100'
| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
| [`disablePublicIp`](#parameter-disablepublicip) | bool | Disable Public IP. |
| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable/Disable usage telemetry for module. |
| [`enhancedSecurityMonitoring`](#parameter-enhancedsecuritymonitoring) | string | The value for enabling or configuring enhanced security monitoring. |
| [`loadBalancerBackendPoolName`](#parameter-loadbalancerbackendpoolname) | string | Name of the outbound Load Balancer Backend Pool for Secure Cluster Connectivity (No Public IP). |
| [`loadBalancerResourceId`](#parameter-loadbalancerresourceid) | string | Resource URI of Outbound Load balancer for Secure Cluster Connectivity (No Public IP) workspace. |
| [`location`](#parameter-location) | string | Location for all Resources. |
Expand Down Expand Up @@ -981,6 +1029,46 @@ The resource ID of a Azure Machine Learning workspace to link with Databricks wo
- Type: string
- Default: `''`

### Parameter: `automaticClusterUpdate`

The value for enabling automatic cluster updates in enhanced security compliance.

- Required: No
- Type: string
- Default: `''`
- Allowed:
```Bicep
[
''
'Disabled'
'Enabled'
]
```

### Parameter: `complianceSecurityProfileValue`

The value to Enable or Disable for the compliance security profile.

- Required: No
- Type: string
- Default: `''`
- Allowed:
```Bicep
[
''
'Disabled'
'Enabled'
]
```

### Parameter: `complianceStandards`

The compliance standards array for the security profile. Should be a list of compliance standards like "HIPAA", "NONE" or "PCI_DSS".

- Required: No
- Type: array
- Default: `[]`

### Parameter: `customerManagedKey`

The customer managed key definition to use for the managed service.
Expand Down Expand Up @@ -1266,6 +1354,22 @@ Enable/Disable usage telemetry for module.
- Type: bool
- Default: `True`

### Parameter: `enhancedSecurityMonitoring`

The value for enabling or configuring enhanced security monitoring.

- Required: No
- Type: string
- Default: `''`
- Allowed:
```Bicep
[
''
'Disabled'
'Enabled'
]
```

### Parameter: `loadBalancerBackendPoolName`

Name of the outbound Load Balancer Backend Pool for Secure Cluster Connectivity (No Public IP).
Expand Down
43 changes: 43 additions & 0 deletions avm/res/databricks/workspace/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,33 @@ param accessConnectorResourceId string = ''
@description('Optional. The default catalog configuration for the Databricks workspace.')
param defaultCatalog defaultCatalogType?

@description('Optional. The value for enabling automatic cluster updates in enhanced security compliance.')
@allowed([
'Enabled'
'Disabled'
''
])
param automaticClusterUpdate string = ''

@description('Optional. The compliance standards array for the security profile. Should be a list of compliance standards like "HIPAA", "NONE" or "PCI_DSS".')
param complianceStandards array = []

@description('Optional. The value to Enable or Disable for the compliance security profile.')
@allowed([
'Enabled'
'Disabled'
''
])
param complianceSecurityProfileValue string = ''

@description('Optional. The value for enabling or configuring enhanced security monitoring.')
@allowed([
'Enabled'
'Disabled'
''
])
param enhancedSecurityMonitoring string = ''

var builtInRoleNames = {
Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
Owner: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
Expand Down Expand Up @@ -339,6 +366,22 @@ resource workspace 'Microsoft.Databricks/workspaces@2024-05-01' = {
initialType: defaultCatalog.?initialType
}
}
: {},
!empty(automaticClusterUpdate) || !empty(complianceStandards) || !empty(enhancedSecurityMonitoring)
? {
enhancedSecurityCompliance: {
automaticClusterUpdate: {
value: automaticClusterUpdate
}
complianceSecurityProfile: {
complianceStandards: complianceStandards
value: complianceSecurityProfileValue
}
enhancedSecurityMonitoring: {
value: enhancedSecurityMonitoring
}
}
}
: {}
)
}
Expand Down
Loading

0 comments on commit 0b236a5

Please sign in to comment.