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
59 changes: 32 additions & 27 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 @@ -147,7 +147,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
name: 'flexibleServerDeployment'
params: {
// Required parameters
name: 'dfpsfse001'
name: 'dfpsmax001'
skuName: 'Standard_D2s_v3'
tier: 'GeneralPurpose'
// Non-required parameters
Expand Down Expand Up @@ -183,7 +183,7 @@ module flexibleServer 'br/public:avm/res/db-for-postgre-sql/flexible-server:<ver
"parameters": {
// Required parameters
"name": {
"value": "dfpsfse001"
"value": "dfpsmax001"
},
"skuName": {
"value": "Standard_D2s_v3"
Expand Down Expand Up @@ -233,7 +233,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 = 'dfpsfse001'
param name = 'dfpsmax001'
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 @@ -1867,15 +1867,13 @@ Custom DNS configurations.

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`fqdn`](#parameter-privateendpointscustomdnsconfigsfqdn) | string | Fqdn that resolves to private endpoint IP address. |
| [`ipAddresses`](#parameter-privateendpointscustomdnsconfigsipaddresses) | array | A list of private IP addresses of the private endpoint. |

### Parameter: `privateEndpoints.customDnsConfigs.fqdn`

Fqdn that resolves to private endpoint IP address.
**Optional parameters**

- Required: No
- Type: string
| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`fqdn`](#parameter-privateendpointscustomdnsconfigsfqdn) | string | FQDN that resolves to private endpoint IP address. |

### Parameter: `privateEndpoints.customDnsConfigs.ipAddresses`

Expand All @@ -1884,6 +1882,13 @@ A list of private IP addresses of the private endpoint.
- Required: Yes
- Type: array

### Parameter: `privateEndpoints.customDnsConfigs.fqdn`

FQDN that resolves to private endpoint IP address.

- Required: No
- Type: string

### Parameter: `privateEndpoints.customNetworkInterfaceName`

The custom name of the network interface attached to the Private Endpoint.
Expand Down Expand Up @@ -2390,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.1.0` | Remote reference |
| `br/public:avm/utl/types/avm-common-types:0.3.0` | Remote reference |

## Data Collection

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 @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "11184980891224869481"
"templateHash": "6763309870198457151"
},
"name": "DBforPostgreSQL Flexible Server Configurations",
"description": "This module deploys a DBforPostgreSQL Flexible Server Configuration.",
Expand Down Expand Up @@ -52,8 +52,8 @@
"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"
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "8538777017463575324"
"templateHash": "3788962983487396437"
},
"name": "DBforPostgreSQL Flexible Server Databases",
"description": "This module deploys a DBforPostgreSQL Flexible Server Database.",
Expand Down Expand Up @@ -52,8 +52,8 @@
"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"
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.1.0'
import { managedIdentityOnlyUserAssignedType } from 'br/public:avm/utl/types/avm-common-types:0.3.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.1.0'
import { customerManagedKeyType } from 'br/public:avm/utl/types/avm-common-types:0.3.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.1.0'
import { lockType } from 'br/public:avm/utl/types/avm-common-types:0.3.0'
@description('Optional. The lock settings of the service.')
param lock lockType?

import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { roleAssignmentType } from 'br/public:avm/utl/types/avm-common-types:0.3.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.1.0'
import { diagnosticSettingFullType } from 'br/public:avm/utl/types/avm-common-types:0.3.0'
@description('Optional. The diagnostic settings of the service.')
param diagnosticSettings diagnosticSettingFullType[]?

import { privateEndpointSingleServiceType } from 'br/public:avm/utl/types/avm-common-types:0.1.0'
import { privateEndpointSingleServiceType } from 'br/public:avm/utl/types/avm-common-types:0.3.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