-
Notifications
You must be signed in to change notification settings - Fork 437
[Modules] Added SQL Protector for SQL Server #3025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bb48d39
added module
jhueppauff d8afb46
Added sql protector
jhueppauff 2d62418
Added version file
jhueppauff 722f149
updated readme
jhueppauff 5f0820e
Moved module
jhueppauff b38f9d3
added encryption to test
jhueppauff 936fe04
Updated API Version
jhueppauff 5f8be86
Added required description to parameter
jhueppauff 595eacb
Update settings.yml
jhueppauff f82cf68
Merge pull request #1 from jhueppauff/main
jhueppauff 5f8e031
Update modules/Microsoft.Sql/servers/encryptionProtector/deploy.bicep
jhueppauff 668b84f
Update settings.yml
jhueppauff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
modules/Microsoft.Sql/servers/encryptionProtector/deploy.bicep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| @description('Conditional. The name of the sql server. Required if the template is used in a standalone deployment.') | ||
| param sqlServerName string | ||
|
|
||
| @description('Required. The name of the server key.') | ||
| param serverKeyName string | ||
|
|
||
| @description('Optional. Key auto rotation opt-in.') | ||
| param autoRotationEnabled bool = false | ||
|
|
||
| @description('Optional. The encryption protector type.') | ||
| @allowed([ | ||
| 'AzureKeyVault' | ||
| 'ServiceManaged' | ||
| ]) | ||
| param serverKeyType string = 'ServiceManaged' | ||
|
|
||
| @description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).') | ||
| param enableDefaultTelemetry bool = true | ||
|
|
||
| resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { | ||
| name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}' | ||
| properties: { | ||
| mode: 'Incremental' | ||
| template: { | ||
| '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' | ||
| contentVersion: '1.0.0.0' | ||
| resources: [] | ||
| } | ||
| } | ||
| } | ||
|
|
||
| resource sqlServer 'Microsoft.Sql/servers@2022-08-01-preview' existing = { | ||
| name: sqlServerName | ||
| } | ||
|
|
||
| resource encryptionProtector 'Microsoft.Sql/servers/encryptionProtector@2022-08-01-preview' = { | ||
| name: 'current' | ||
| parent: sqlServer | ||
| properties: { | ||
| serverKeyType: serverKeyType | ||
| autoRotationEnabled: autoRotationEnabled | ||
| serverKeyName: serverKeyName | ||
| } | ||
| } | ||
|
|
||
| @description('The name of the deployed encryption protector.') | ||
| output name string = encryptionProtector.name | ||
|
|
||
| @description('The resource ID of the encryption protector.') | ||
| output resourceId string = encryptionProtector.id | ||
|
|
||
| @description('The resource group of the deployed encryption protector.') | ||
| output resourceGroupName string = resourceGroup().name |
51 changes: 51 additions & 0 deletions
51
modules/Microsoft.Sql/servers/encryptionProtector/readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Sql Servers EncryptionProtector `[Microsoft.Sql/servers/encryptionProtector]` | ||
|
|
||
| This module deploys an Sql Servers Encryption Protector. | ||
|
|
||
| ## Navigation | ||
|
|
||
| - [Resource Types](#Resource-Types) | ||
| - [Parameters](#Parameters) | ||
| - [Outputs](#Outputs) | ||
| - [Cross-referenced modules](#Cross-referenced-modules) | ||
|
|
||
| ## Resource Types | ||
|
|
||
| | Resource Type | API Version | | ||
| | :-- | :-- | | ||
| | `Microsoft.Sql/servers/encryptionProtector` | [2021-11-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Sql/2021-11-01/servers/encryptionProtector) | | ||
|
|
||
| ## Parameters | ||
|
|
||
| **Required parameters** | ||
|
|
||
| | Parameter Name | Type | Description | | ||
| | :-- | :-- | :-- | | ||
| | `serverKeyName` | string | The name of the server key. | | ||
|
|
||
| **Conditional parameters** | ||
|
|
||
| | Parameter Name | Type | Description | | ||
| | :-- | :-- | :-- | | ||
| | `sqlServerName` | string | The name of the sql server. | | ||
|
|
||
| **Optional parameters** | ||
|
|
||
| | Parameter Name | Type | Default Value | Allowed Values | Description | | ||
| | :-- | :-- | :-- | :-- | :-- | | ||
| | `autoRotationEnabled` | bool | `False` | | Key auto rotation opt-in. | | ||
| | `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via a Globally Unique Identifier (GUID). | | ||
| | `serverKeyType` | string | `'ServiceManaged'` | `[AzureKeyVault, ServiceManaged]` | The encryption protector type like "ServiceManaged", "AzureKeyVault". | | ||
|
|
||
|
|
||
| ## Outputs | ||
|
|
||
| | Output Name | Type | Description | | ||
| | :-- | :-- | :-- | | ||
| | `name` | string | The name of the deployed encryption protector. | | ||
| | `resourceGroupName` | string | The resource group of the deployed encryption protector. | | ||
| | `resourceId` | string | The resource ID of the encryption protector. | | ||
|
|
||
| ## Cross-referenced modules | ||
|
|
||
| _None_ |
4 changes: 4 additions & 0 deletions
4
modules/Microsoft.Sql/servers/encryptionProtector/version.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", | ||
| "version": "0.5" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.