Skip to content
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

feat: Updated DB-For-Postgre-SQL-Flexible Server CMK implementation #3739

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
36 changes: 18 additions & 18 deletions avm/res/db-for-postgre-sql/flexible-server/README.md
AlexanderSehr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
name: 'flexibleServerDeployment'
params: {
// Required parameters
name: 'dfpsfsmin001'
name: 'dfpsmin001'
skuName: 'Standard_D2s_v3'
tier: 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -84,7 +84,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
"parameters": {
// Required parameters
"name": {
"value": "dfpsfsmin001"
"value": "dfpsmin001"
},
"skuName": {
"value": "Standard_D2s_v3"
Expand Down Expand Up @@ -117,7 +117,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
using 'br/public:avm/res/db-for-postgre-sql/flexible-server:<version>'

// Required parameters
param name = 'dfpsfsmin001'
param name = 'dfpsmin001'
param skuName = 'Standard_D2s_v3'
param tier = 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -270,7 +270,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
name: 'flexibleServerDeployment'
params: {
// Required parameters
name: 'dfpsfspvt001'
name: 'dfpspvt001'
skuName: 'Standard_D2s_v3'
tier: 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -356,7 +356,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
"parameters": {
// Required parameters
"name": {
"value": "dfpsfspvt001"
"value": "dfpspvt001"
},
"skuName": {
"value": "Standard_D2s_v3"
Expand Down Expand Up @@ -466,7 +466,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
using 'br/public:avm/res/db-for-postgre-sql/flexible-server:<version>'

// Required parameters
param name = 'dfpsfspvt001'
param name = 'dfpspvt001'
param skuName = 'Standard_D2s_v3'
param tier = 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -553,7 +553,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
name: 'flexibleServerDeployment'
params: {
// Required parameters
name: 'dfpsfspe001'
name: 'dfpspe001'
skuName: 'Standard_D2ds_v5'
tier: 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -603,7 +603,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
"parameters": {
// Required parameters
"name": {
"value": "dfpsfspe001"
"value": "dfpspe001"
},
"skuName": {
"value": "Standard_D2ds_v5"
Expand Down Expand Up @@ -669,7 +669,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
using 'br/public:avm/res/db-for-postgre-sql/flexible-server:<version>'

// Required parameters
param name = 'dfpsfspe001'
param name = 'dfpspe001'
param skuName = 'Standard_D2ds_v5'
param tier = 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -720,7 +720,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
name: 'flexibleServerDeployment'
params: {
// Required parameters
name: 'dfpsfspub001'
name: 'dfpspub001'
skuName: 'Standard_D2s_v3'
tier: 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -825,7 +825,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
"parameters": {
// Required parameters
"name": {
"value": "dfpsfspub001"
"value": "dfpspub001"
},
"skuName": {
"value": "Standard_D2s_v3"
Expand Down Expand Up @@ -958,7 +958,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
using 'br/public:avm/res/db-for-postgre-sql/flexible-server:<version>'

// Required parameters
param name = 'dfpsfspub001'
param name = 'dfpspub001'
param skuName = 'Standard_D2s_v3'
param tier = 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -1064,7 +1064,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
name: 'flexibleServerDeployment'
params: {
// Required parameters
name: 'dfpsfswaf001'
name: 'dfpswaf001'
skuName: 'Standard_D2s_v3'
tier: 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -1138,7 +1138,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
"parameters": {
// Required parameters
"name": {
"value": "dfpsfswaf001"
"value": "dfpswaf001"
},
"skuName": {
"value": "Standard_D2s_v3"
Expand Down Expand Up @@ -1234,7 +1234,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
using 'br/public:avm/res/db-for-postgre-sql/flexible-server:<version>'

// Required parameters
param name = 'dfpsfswaf001'
param name = 'dfpswaf001'
param skuName = 'Standard_D2s_v3'
param tier = 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -1500,7 +1500,7 @@ The customer managed key definition.

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, using 'latest'. |
| [`keyVersion`](#parameter-customermanagedkeykeyversion) | string | The version of the customer managed key to reference for encryption. If not provided, the deployment will use the latest version available at deployment time. |
| [`userAssignedIdentityResourceId`](#parameter-customermanagedkeyuserassignedidentityresourceid) | string | User assigned identity to use when fetching the customer managed key. Required if no system assigned identity is available for use. |

### Parameter: `customerManagedKey.keyName`
Expand All @@ -1519,7 +1519,7 @@ The resource ID of a key vault to reference a customer managed key for encryptio

### Parameter: `customerManagedKey.keyVersion`

The version of the customer managed key to reference for encryption. If not provided, using 'latest'.
The version of the customer managed key to reference for encryption. If not provided, the deployment will use the latest version available at deployment time.

- Required: No
- Type: string
Expand Down Expand Up @@ -2395,7 +2395,7 @@ This section gives you an overview of all local-referenced module files (i.e., o
| Reference | Type |
| :-- | :-- |
| `br/public:avm/res/network/private-endpoint:0.8.0` | Remote reference |
| `br/public:avm/utl/types/avm-common-types:0.2.1` | Remote reference |
| `br/public:avm/utl/types/avm-common-types:0.4.0` | Remote reference |

## Data Collection

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.34.60546",
"templateHash": "16481538210870485841"
"version": "0.31.92.45157",
"templateHash": "787734745917336225"
},
"name": "DBforPostgreSQL Flexible Server Administrators",
"description": "This module deploys a DBforPostgreSQL Flexible Server Administrator.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ resource configuration 'Microsoft.DBforPostgreSQL/flexibleServers/configurations
name: name
parent: flexibleServer
properties: {
source: !empty(source) ? source : null
value: !empty(value) ? value : null
source: source
value: value
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.34.60546",
"templateHash": "4744350024962623928"
"version": "0.31.92.45157",
"templateHash": "17544917398852278943"
},
"name": "DBforPostgreSQL Flexible Server Configurations",
"description": "This module deploys a DBforPostgreSQL Flexible Server Configuration.",
Expand Down Expand Up @@ -52,9 +52,12 @@
"apiVersion": "2022-12-01",
"name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
"properties": {
"source": "[if(not(empty(parameters('source'))), parameters('source'), null())]",
"value": "[if(not(empty(parameters('value'))), parameters('value'), null())]"
}
"source": "[parameters('source')]",
"value": "[parameters('value')]"
},
"dependsOn": [
"flexibleServer"
]
}
},
"outputs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ resource database 'Microsoft.DBforPostgreSQL/flexibleServers/databases@2022-12-0
name: name
parent: flexibleServer
properties: {
collation: !empty(collation) ? collation : null
charset: !empty(charset) ? charset : null
collation: collation
charset: charset
}
}

Expand Down
13 changes: 8 additions & 5 deletions avm/res/db-for-postgre-sql/flexible-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.31.34.60546",
"templateHash": "5925943942284222024"
"version": "0.31.92.45157",
"templateHash": "3975156466788361818"
},
"name": "DBforPostgreSQL Flexible Server Databases",
"description": "This module deploys a DBforPostgreSQL Flexible Server Database.",
Expand Down Expand Up @@ -52,9 +52,12 @@
"apiVersion": "2022-12-01",
"name": "[format('{0}/{1}', parameters('flexibleServerName'), parameters('name'))]",
"properties": {
"collation": "[if(not(empty(parameters('collation'))), parameters('collation'), null())]",
"charset": "[if(not(empty(parameters('charset'))), parameters('charset'), null())]"
}
"collation": "[parameters('collation')]",
"charset": "[parameters('charset')]"
},
"dependsOn": [
"flexibleServer"
]
}
},
"outputs": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.31.34.60546",
"templateHash": "9983440066171652627"
"version": "0.31.92.45157",
"templateHash": "13990914411694160996"
},
"name": "DBforPostgreSQL Flexible Server Firewall Rules",
"description": "This module deploys a DBforPostgreSQL Flexible Server Firewall Rule.",
Expand Down
12 changes: 6 additions & 6 deletions avm/res/db-for-postgre-sql/flexible-server/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ param highAvailability string = 'ZoneRedundant'
@description('Optional. The mode to create a new PostgreSQL server.')
param createMode string = 'Default'

import { managedIdentityOnlyUserAssignedType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
import { managedIdentityOnlyUserAssignedType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Conditional. The managed identity definition for this resource. Required if \'cMKKeyName\' is not empty.')
param managedIdentities managedIdentityOnlyUserAssignedType?

import { customerManagedKeyType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
import { customerManagedKeyType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Optional. The customer managed key definition.')
param customerManagedKey customerManagedKeyType?

Expand Down Expand Up @@ -135,11 +135,11 @@ param databases array = []
@description('Optional. The configurations to create in the server.')
param configurations array = []

import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Optional. The lock settings of the service.')
param lock lockType?

import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Optional. Array of role assignments to create.')
param roleAssignments roleAssignmentType[]?

Expand All @@ -149,11 +149,11 @@ param tags object?
@description('Optional. Enable/Disable usage telemetry for module.')
param enableTelemetry bool = true

import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Optional. The diagnostic settings of the service.')
param diagnosticSettings diagnosticSettingFullType[]?

import { privateEndpointSingleServiceType } from 'br/public:avm/utl/types/avm-common-types:0.2.1'
import { privateEndpointSingleServiceType } from 'br/public:avm/utl/types/avm-common-types:0.4.0'
@description('Optional. Configuration details for private endpoints. Used when the desired connectivy mode is \'Public Access\' and \'delegatedSubnetResourceId\' is NOT used.')
param privateEndpoints privateEndpointSingleServiceType[]?

Expand Down
Loading