Skip to content

Commit

Permalink
feat: Add UDT for all avm/res/sql/server submodules (Azure#3807)
Browse files Browse the repository at this point in the history
## Description

This PR adds the remaining UDTs for al SQL submodules

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.sql.server](https://github.com/peterbud/bicep-registry-modules/actions/workflows/avm.res.sql.server.yml/badge.svg)](https://github.com/peterbud/bicep-registry-modules/actions/workflows/avm.res.sql.server.yml)
|

Pls note that WAF fails due to missing maintenance window in my
subscription.

## Type of Change

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

- [ ] Update to CI Environment or utilities (Non-module affecting
changes)
- [ ] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] 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`.
- [x] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] 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 -->
  • Loading branch information
peterbud authored Nov 29, 2024
1 parent fee3bbd commit 426a9ba
Show file tree
Hide file tree
Showing 29 changed files with 1,237 additions and 344 deletions.
469 changes: 409 additions & 60 deletions avm/res/sql/server/README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions avm/res/sql/server/audit-settings/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "6303070680265885029"
"version": "0.31.92.45157",
"templateHash": "4626140114742164628"
},
"name": "Azure SQL Server Audit Settings",
"description": "This module deploys an Azure SQL Server Audit Settings.",
Expand Down Expand Up @@ -152,8 +152,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "13956215614091387428"
"version": "0.31.92.45157",
"templateHash": "2903956714854050681"
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "841731129374883266"
"version": "0.31.92.45157",
"templateHash": "3060709558343951533"
},
"name": "SQL Server Database Long Term Backup Retention Policies",
"description": "This module deploys an Azure SQL Server Database Long-Term Backup Retention Policy.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "14890409200962565555"
"version": "0.31.92.45157",
"templateHash": "1465086214783345027"
},
"name": "Azure SQL Server Database Short Term Backup Retention Policies",
"description": "This module deploys an Azure SQL Server Database Short-Term Backup Retention Policy.",
Expand Down
12 changes: 6 additions & 6 deletions avm/res/sql/server/database/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "18018827030977470456"
"version": "0.31.92.45157",
"templateHash": "10088627667414343400"
},
"name": "SQL Server Database",
"description": "This module deploys an Azure SQL Server Database.",
Expand Down Expand Up @@ -721,8 +721,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "14890409200962565555"
"version": "0.31.92.45157",
"templateHash": "1465086214783345027"
},
"name": "Azure SQL Server Database Short Term Backup Retention Policies",
"description": "This module deploys an Azure SQL Server Database Short-Term Backup Retention Policy.",
Expand Down Expand Up @@ -839,8 +839,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "841731129374883266"
"version": "0.31.92.45157",
"templateHash": "3060709558343951533"
},
"name": "SQL Server Database Long Term Backup Retention Policies",
"description": "This module deploys an Azure SQL Server Database Long-Term Backup Retention Policy.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/sql/server/elastic-pool/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "10024079638382167120"
"version": "0.31.92.45157",
"templateHash": "9050866823207809352"
},
"name": "SQL Server Elastic Pool",
"description": "This module deploys an Azure SQL Server Elastic Pool.",
Expand Down
6 changes: 3 additions & 3 deletions avm/res/sql/server/encryption-protector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This module deploys an Azure SQL Server Encryption Protector.

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`autoRotationEnabled`](#parameter-autorotationenabled) | bool | Key auto rotation opt-in. |
| [`autoRotationEnabled`](#parameter-autorotationenabled) | bool | Key auto rotation opt-in flag. |
| [`serverKeyType`](#parameter-serverkeytype) | string | The encryption protector type. |

### Parameter: `serverKeyName`
Expand All @@ -51,11 +51,11 @@ The name of the sql server. Required if the template is used in a standalone dep

### Parameter: `autoRotationEnabled`

Key auto rotation opt-in.
Key auto rotation opt-in flag.

- Required: No
- Type: bool
- Default: `False`
- Default: `True`

### Parameter: `serverKeyType`

Expand Down
4 changes: 2 additions & 2 deletions avm/res/sql/server/encryption-protector/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ 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. Key auto rotation opt-in flag.')
param autoRotationEnabled bool = true

@description('Optional. The encryption protector type.')
@allowed([
Expand Down
8 changes: 4 additions & 4 deletions avm/res/sql/server/encryption-protector/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "11473914706327458055"
"version": "0.31.92.45157",
"templateHash": "3436938593239210559"
},
"name": "Azure SQL Server Encryption Protector",
"description": "This module deploys an Azure SQL Server Encryption Protector.",
Expand All @@ -26,9 +26,9 @@
},
"autoRotationEnabled": {
"type": "bool",
"defaultValue": false,
"defaultValue": true,
"metadata": {
"description": "Optional. Key auto rotation opt-in."
"description": "Optional. Key auto rotation opt-in flag."
}
},
"serverKeyType": {
Expand Down
4 changes: 2 additions & 2 deletions avm/res/sql/server/firewall-rule/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "6449556555046717103"
"version": "0.31.92.45157",
"templateHash": "16725482503837347177"
},
"name": "Azure SQL Server Firewall Rule",
"description": "This module deploys an Azure SQL Server Firewall Rule.",
Expand Down
8 changes: 4 additions & 4 deletions avm/res/sql/server/key/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ This module deploys an Azure SQL Server Key.
| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`name`](#parameter-name) | string | The name of the key. Must follow the [<keyVaultName>_<keyName>_<keyVersion>] pattern. |
| [`serverKeyType`](#parameter-serverkeytype) | string | The encryption protector type like "ServiceManaged", "AzureKeyVault". |
| [`uri`](#parameter-uri) | string | The URI of the key. If the ServerKeyType is AzureKeyVault, then either the URI or the keyVaultName/keyName combination is required. |
| [`serverKeyType`](#parameter-serverkeytype) | string | The server key type. |
| [`uri`](#parameter-uri) | string | The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is required to be in this format: 'https://YourVaultName.azure.net/keys/YourKeyName/YourKeyVersion'. |

### Parameter: `serverName`

Expand All @@ -46,7 +46,7 @@ The name of the key. Must follow the [<keyVaultName>_<keyName>_<keyVersion>] pat

### Parameter: `serverKeyType`

The encryption protector type like "ServiceManaged", "AzureKeyVault".
The server key type.

- Required: No
- Type: string
Expand All @@ -61,7 +61,7 @@ The encryption protector type like "ServiceManaged", "AzureKeyVault".

### Parameter: `uri`

The URI of the key. If the ServerKeyType is AzureKeyVault, then either the URI or the keyVaultName/keyName combination is required.
The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is required to be in this format: 'https://YourVaultName.azure.net/keys/YourKeyName/YourKeyVersion'.

- Required: No
- Type: string
Expand Down
4 changes: 2 additions & 2 deletions avm/res/sql/server/key/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ param name string?
@description('Conditional. The name of the parent SQL server. Required if the template is used in a standalone deployment.')
param serverName string

@description('Optional. The encryption protector type like "ServiceManaged", "AzureKeyVault".')
@description('Optional. The server key type.')
@allowed([
'AzureKeyVault'
'ServiceManaged'
])
param serverKeyType string = 'ServiceManaged'

@description('Optional. The URI of the key. If the ServerKeyType is AzureKeyVault, then either the URI or the keyVaultName/keyName combination is required.')
@description('Optional. The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is required to be in this format: \'https://YourVaultName.azure.net/keys/YourKeyName/YourKeyVersion\'.')
param uri string = ''

var splittedKeyUri = split(uri, '/')
Expand Down
8 changes: 4 additions & 4 deletions avm/res/sql/server/key/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "17839617504395216689"
"version": "0.31.92.45157",
"templateHash": "16457177770650062823"
},
"name": "Azure SQL Server Keys",
"description": "This module deploys an Azure SQL Server Key.",
Expand Down Expand Up @@ -34,14 +34,14 @@
"ServiceManaged"
],
"metadata": {
"description": "Optional. The encryption protector type like \"ServiceManaged\", \"AzureKeyVault\"."
"description": "Optional. The server key type."
}
},
"uri": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Optional. The URI of the key. If the ServerKeyType is AzureKeyVault, then either the URI or the keyVaultName/keyName combination is required."
"description": "Optional. The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is required to be in this format: 'https://YourVaultName.azure.net/keys/YourKeyName/YourKeyVersion'."
}
}
},
Expand Down
Loading

0 comments on commit 426a9ba

Please sign in to comment.