diff --git a/.github/workflows/ms.dbforpostgresql.flexibleservers.yml b/.github/workflows/ms.dbforpostgresql.flexibleservers.yml index e320fc7a46..ea4b928fb7 100644 --- a/.github/workflows/ms.dbforpostgresql.flexibleservers.yml +++ b/.github/workflows/ms.dbforpostgresql.flexibleservers.yml @@ -109,8 +109,7 @@ jobs: - name: 'Using test file [${{ matrix.moduleTestFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' + templateFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' location: '${{ env.location }}' resourceGroupName: '${{ env.resourceGroupName }}' subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' diff --git a/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/min.parameters.json b/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/min.parameters.json deleted file mode 100644 index c2f6ed475a..0000000000 --- a/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/min.parameters.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-postgresqlflexserver-min-001" - }, - "skuName": { - "value": "Standard_B2s" - }, - "tier": { - "value": "Burstable" - }, - "administratorLogin": { - "value": "adminUserName" - }, - "administratorLoginPassword": { - "reference": { - "keyVault": { - "id": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-<>-az-kv-x-001" - }, - "secretName": "administratorLoginPassword" - } - } - } -} diff --git a/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/min/deploy.test.bicep b/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/min/deploy.test.bicep new file mode 100644 index 0000000000..6f26f27e64 --- /dev/null +++ b/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/min/deploy.test.bicep @@ -0,0 +1,45 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +param resourceGroupName string = 'ms.dbforpostgresql.flexibleservers-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to.') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +param serviceShort string = 'dfpsfsmin' + +@description('Optional. The password to leverage for the login.') +@secure() +param password string = newGuid() + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + administratorLogin: 'adminUserName' + administratorLoginPassword: password + skuName: 'Standard_B2s' + tier: 'Burstable' + } +} diff --git a/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/private.parameters.json b/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/private.parameters.json deleted file mode 100644 index ed8f972498..0000000000 --- a/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/private.parameters.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-postgresqlflexserver-private-001" - }, - "skuName": { - "value": "Standard_D2s_v3" - }, - "tier": { - "value": "GeneralPurpose" - }, - "administratorLogin": { - "value": "adminUserName" - }, - "administratorLoginPassword": { - "reference": { - "keyVault": { - "id": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-<>-az-kv-x-001" - }, - "secretName": "administratorLoginPassword" - } - }, - "geoRedundantBackup": { - "value": "Enabled" - }, - "delegatedSubnetResourceId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-postgres/subnets/<>-az-subnet-x-postgres" - }, - "privateDnsZoneArmResourceId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/<>.postgres.database.azure.com" - }, - "databases": { - "value": [ - { - "name": "testdb1", - "collation": "en_US.utf8", - "charset": "UTF8" - }, - { - "name": "testdb2" - } - ] - }, - "configurations": { - "value": [ - { - "name": "log_min_messages", - "source": "user-override", - "value": "INFO" - }, - { - "name": "autovacuum_naptime", - "source": "user-override", - "value": "80" - } - ] - }, - "diagnosticLogsRetentionInDays": { - "value": 7 - }, - "diagnosticStorageAccountId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001" - }, - "diagnosticWorkspaceId": { - "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001" - }, - "diagnosticEventHubAuthorizationRuleId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey" - }, - "diagnosticEventHubName": { - "value": "adp-<>-az-evh-x-001" - } - } -} diff --git a/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/private/dependencies.bicep b/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/private/dependencies.bicep new file mode 100644 index 0000000000..79f6a40138 --- /dev/null +++ b/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/private/dependencies.bicep @@ -0,0 +1,66 @@ +@description('Optional. The location to deploy to.') +param location string = resourceGroup().location + +@description('Required. The name of the Virtual Network to create.') +param virtualNetworkName string + +@description('Required. The name of the Managed Identity to create.') +param managedIdentityName string + +resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-01-01' = { + name: virtualNetworkName + location: location + properties: { + addressSpace: { + addressPrefixes: [ + '10.0.0.0/24' + ] + } + subnets: [ + { + name: 'defaultSubnet' + properties: { + addressPrefix: '10.0.0.0/24' + delegations: [ + { + name: 'Microsoft.DBforPostgreSQL.flexibleServers' + properties: { + serviceName: 'Microsoft.DBforPostgreSQL/flexibleServers' + } + } + ] + } + } + ] + } +} + +resource privateDNSZone 'Microsoft.Network/privateDnsZones@2020-06-01' = { + name: 'postgres.database.azure.com' + location: 'global' + + resource virtualNetworkLinks 'virtualNetworkLinks@2020-06-01' = { + name: '${virtualNetwork.name}-vnetlink' + location: 'global' + properties: { + virtualNetwork: { + id: virtualNetwork.id + } + registrationEnabled: false + } + } +} + +resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { + name: managedIdentityName + location: location +} + +@description('The resource ID of the created Virtual Network Subnet.') +output subnetResourceId string = virtualNetwork.properties.subnets[0].id + +@description('The resource ID of the created Private DNS Zone.') +output privateDNSResourceId string = privateDNSZone.id + +@description('The principal ID of the created Managed Identity.') +output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/private/deploy.test.bicep b/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/private/deploy.test.bicep new file mode 100644 index 0000000000..f349ce8914 --- /dev/null +++ b/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/private/deploy.test.bicep @@ -0,0 +1,98 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +param resourceGroupName string = 'ms.dbforpostgresql.flexibleservers-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to.') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +param serviceShort string = 'dfpsfspvt' + +@description('Optional. The password to leverage for the login.') +@secure() +param password string = newGuid() + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +module resourceGroupResources 'dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-paramNested' + params: { + virtualNetworkName: 'dep-<>-vnet-${serviceShort}' + managedIdentityName: 'dep-<>-msi-${serviceShort}' + } +} + +// Diagnostics +// =========== +module diagnosticDependencies '../../../../.shared/dependencyConstructs/diagnostic.dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + params: { + storageAccountName: 'dep<>diasa${serviceShort}01' + logAnalyticsWorkspaceName: 'dep-<>-law-${serviceShort}' + eventHubNamespaceEventHubName: 'dep-<>-evh-${serviceShort}' + eventHubNamespaceName: 'dep-<>-evhns-${serviceShort}' + location: location + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + administratorLogin: 'adminUserName' + administratorLoginPassword: password + skuName: 'Standard_D2s_v3' + tier: 'GeneralPurpose' + configurations: [ + { + name: 'log_min_messages' + source: 'user-override' + value: 'INFO' + } + { + name: 'autovacuum_naptime' + source: 'user-override' + value: '80' + } + ] + databases: [ + { + charset: 'UTF8' + collation: 'en_US.utf8' + name: 'testdb1' + } + { + name: 'testdb2' + } + ] + delegatedSubnetResourceId: resourceGroupResources.outputs.subnetResourceId + diagnosticStorageAccountId: diagnosticDependencies.outputs.storageAccountResourceId + diagnosticWorkspaceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId + diagnosticEventHubAuthorizationRuleId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId + diagnosticEventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName + diagnosticLogsRetentionInDays: 7 + geoRedundantBackup: 'Enabled' + privateDnsZoneArmResourceId: resourceGroupResources.outputs.privateDNSResourceId + } +} diff --git a/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/public.parameters.json b/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/public.parameters.json deleted file mode 100644 index 8eacc69760..0000000000 --- a/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/public.parameters.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-postgresqlflexserver-public-001" - }, - "skuName": { - "value": "Standard_D2s_v3" - }, - "tier": { - "value": "GeneralPurpose" - }, - "administratorLogin": { - "value": "adminUserName" - }, - "administratorLoginPassword": { - "reference": { - "keyVault": { - "id": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-<>-az-kv-x-001" - }, - "secretName": "administratorLoginPassword" - } - }, - "availabilityZone": { - "value": "2" - }, - "backupRetentionDays": { - "value": 20 - }, - "geoRedundantBackup": { - "value": "Enabled" - }, - "storageSizeGB": { - "value": 1024 - }, - "version": { - "value": "14" - }, - "highAvailability": { - "value": "SameZone" - }, - "location": { - "value": "westeurope" - }, - "firewallRules": { - "value": [ - { - "name": "AllowAllWindowsAzureIps", - "endIpAddress": "0.0.0.0", - "startIpAddress": "0.0.0.0" - }, - { - "name": "test-rule1", - "startIpAddress": "10.10.10.1", - "endIpAddress": "10.10.10.10" - }, - { - "name": "test-rule2", - "startIpAddress": "100.100.100.1", - "endIpAddress": "100.100.100.10" - } - ] - }, - "databases": { - "value": [ - { - "name": "testdb1", - "collation": "en_US.utf8", - "charset": "UTF8" - }, - { - "name": "testdb2" - } - ] - }, - "configurations": { - "value": [ - { - "name": "log_min_messages", - "source": "user-override", - "value": "INFO" - } - ] - }, - "diagnosticLogsRetentionInDays": { - "value": 7 - }, - "diagnosticStorageAccountId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001" - }, - "diagnosticWorkspaceId": { - "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001" - }, - "diagnosticEventHubAuthorizationRuleId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey" - }, - "diagnosticEventHubName": { - "value": "adp-<>-az-evh-x-001" - } - } -} diff --git a/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/public/deploy.test.bicep b/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/public/deploy.test.bicep new file mode 100644 index 0000000000..ddf2b64456 --- /dev/null +++ b/modules/Microsoft.DBforPostgreSQL/flexibleServers/.test/public/deploy.test.bicep @@ -0,0 +1,105 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +param resourceGroupName string = 'ms.dbforpostgresql.flexibleservers-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to.') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +param serviceShort string = 'dfpsfspub' + +@description('Optional. The password to leverage for the login.') +@secure() +param password string = newGuid() + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +// Diagnostics +// =========== +module diagnosticDependencies '../../../../.shared/dependencyConstructs/diagnostic.dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-diagnosticDependencies' + params: { + storageAccountName: 'dep<>diasa${serviceShort}01' + logAnalyticsWorkspaceName: 'dep-<>-law-${serviceShort}' + eventHubNamespaceEventHubName: 'dep-<>-evh-${serviceShort}' + eventHubNamespaceName: 'dep-<>-evhns-${serviceShort}' + location: location + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}002' + administratorLogin: 'adminUserName' + administratorLoginPassword: password + skuName: 'Standard_D2s_v3' + tier: 'GeneralPurpose' + availabilityZone: '2' + backupRetentionDays: 20 + configurations: [ + { + name: 'log_min_messages' + source: 'user-override' + value: 'INFO' + } + ] + databases: [ + { + charset: 'UTF8' + collation: 'en_US.utf8' + name: 'testdb1' + } + { + name: 'testdb2' + } + ] + diagnosticStorageAccountId: diagnosticDependencies.outputs.storageAccountResourceId + diagnosticWorkspaceId: diagnosticDependencies.outputs.logAnalyticsWorkspaceResourceId + diagnosticEventHubAuthorizationRuleId: diagnosticDependencies.outputs.eventHubAuthorizationRuleId + diagnosticEventHubName: diagnosticDependencies.outputs.eventHubNamespaceEventHubName + diagnosticLogsRetentionInDays: 7 + firewallRules: [ + { + endIpAddress: '0.0.0.0' + name: 'AllowAllWindowsAzureIps' + startIpAddress: '0.0.0.0' + } + { + endIpAddress: '10.10.10.10' + name: 'test-rule1' + startIpAddress: '10.10.10.1' + } + { + endIpAddress: '100.100.100.10' + name: 'test-rule2' + startIpAddress: '100.100.100.1' + } + ] + geoRedundantBackup: 'Enabled' + highAvailability: 'SameZone' + location: location + storageSizeGB: 1024 + version: '14' + } +} diff --git a/modules/Microsoft.DBforPostgreSQL/flexibleServers/readme.md b/modules/Microsoft.DBforPostgreSQL/flexibleServers/readme.md index ab2b5cfa27..4c14a141de 100644 --- a/modules/Microsoft.DBforPostgreSQL/flexibleServers/readme.md +++ b/modules/Microsoft.DBforPostgreSQL/flexibleServers/readme.md @@ -338,18 +338,13 @@ The following module usage examples are retrieved from the content of the files via Bicep module ```bicep -resource kv1 'Microsoft.KeyVault/vaults@2019-09-01' existing = { - name: 'adp-<>-az-kv-x-001' - scope: resourceGroup('<>','validation-rg') -} - module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-FlexibleServers' + name: '${uniqueString(deployment().name)}-test-dfpsfsmin' params: { // Required parameters administratorLogin: 'adminUserName' - administratorLoginPassword: kv1.getSecret('administratorLoginPassword') - name: '<>-az-postgresqlflexserver-min-001' + administratorLoginPassword: '' + name: '<>dfpsfsmin001' skuName: 'Standard_B2s' tier: 'Burstable' } @@ -373,15 +368,10 @@ module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep "value": "adminUserName" }, "administratorLoginPassword": { - "reference": { - "keyVault": { - "id": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-<>-az-kv-x-001" - }, - "secretName": "administratorLoginPassword" - } + "value": "" }, "name": { - "value": "<>-az-postgresqlflexserver-min-001" + "value": "<>dfpsfsmin001" }, "skuName": { "value": "Standard_B2s" @@ -403,18 +393,13 @@ module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep via Bicep module ```bicep -resource kv1 'Microsoft.KeyVault/vaults@2019-09-01' existing = { - name: 'adp-<>-az-kv-x-001' - scope: resourceGroup('<>','validation-rg') -} - module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-FlexibleServers' + name: '${uniqueString(deployment().name)}-test-dfpsfspvt' params: { // Required parameters administratorLogin: 'adminUserName' - administratorLoginPassword: kv1.getSecret('administratorLoginPassword') - name: '<>-az-postgresqlflexserver-private-001' + administratorLoginPassword: '' + name: '<>dfpsfspvt001' skuName: 'Standard_D2s_v3' tier: 'GeneralPurpose' // Non-required parameters @@ -440,14 +425,14 @@ module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep name: 'testdb2' } ] - delegatedSubnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-postgres/subnets/<>-az-subnet-x-postgres' - diagnosticEventHubAuthorizationRuleId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey' - diagnosticEventHubName: 'adp-<>-az-evh-x-001' + delegatedSubnetResourceId: '' + diagnosticEventHubAuthorizationRuleId: '' + diagnosticEventHubName: '' diagnosticLogsRetentionInDays: 7 - diagnosticStorageAccountId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001' - diagnosticWorkspaceId: '/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001' + diagnosticStorageAccountId: '' + diagnosticWorkspaceId: '' geoRedundantBackup: 'Enabled' - privateDnsZoneArmResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/<>.postgres.database.azure.com' + privateDnsZoneArmResourceId: '' } } ``` @@ -469,15 +454,10 @@ module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep "value": "adminUserName" }, "administratorLoginPassword": { - "reference": { - "keyVault": { - "id": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-<>-az-kv-x-001" - }, - "secretName": "administratorLoginPassword" - } + "value": "" }, "name": { - "value": "<>-az-postgresqlflexserver-private-001" + "value": "<>dfpsfspvt001" }, "skuName": { "value": "Standard_D2s_v3" @@ -513,28 +493,28 @@ module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep ] }, "delegatedSubnetResourceId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-postgres/subnets/<>-az-subnet-x-postgres" + "value": "" }, "diagnosticEventHubAuthorizationRuleId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey" + "value": "" }, "diagnosticEventHubName": { - "value": "adp-<>-az-evh-x-001" + "value": "" }, "diagnosticLogsRetentionInDays": { "value": 7 }, "diagnosticStorageAccountId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001" + "value": "" }, "diagnosticWorkspaceId": { - "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001" + "value": "" }, "geoRedundantBackup": { "value": "Enabled" }, "privateDnsZoneArmResourceId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/<>.postgres.database.azure.com" + "value": "" } } } @@ -550,18 +530,13 @@ module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep via Bicep module ```bicep -resource kv1 'Microsoft.KeyVault/vaults@2019-09-01' existing = { - name: 'adp-<>-az-kv-x-001' - scope: resourceGroup('<>','validation-rg') -} - module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-FlexibleServers' + name: '${uniqueString(deployment().name)}-test-dfpsfspub' params: { // Required parameters administratorLogin: 'adminUserName' - administratorLoginPassword: kv1.getSecret('administratorLoginPassword') - name: '<>-az-postgresqlflexserver-public-001' + administratorLoginPassword: '' + name: '<>dfpsfspub002' skuName: 'Standard_D2s_v3' tier: 'GeneralPurpose' // Non-required parameters @@ -584,11 +559,11 @@ module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep name: 'testdb2' } ] - diagnosticEventHubAuthorizationRuleId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey' - diagnosticEventHubName: 'adp-<>-az-evh-x-001' + diagnosticEventHubAuthorizationRuleId: '' + diagnosticEventHubName: '' diagnosticLogsRetentionInDays: 7 - diagnosticStorageAccountId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001' - diagnosticWorkspaceId: '/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001' + diagnosticStorageAccountId: '' + diagnosticWorkspaceId: '' firewallRules: [ { endIpAddress: '0.0.0.0' @@ -608,7 +583,7 @@ module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep ] geoRedundantBackup: 'Enabled' highAvailability: 'SameZone' - location: 'westeurope' + location: '' storageSizeGB: 1024 version: '14' } @@ -632,15 +607,10 @@ module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep "value": "adminUserName" }, "administratorLoginPassword": { - "reference": { - "keyVault": { - "id": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.KeyVault/vaults/adp-<>-az-kv-x-001" - }, - "secretName": "administratorLoginPassword" - } + "value": "" }, "name": { - "value": "<>-az-postgresqlflexserver-public-001" + "value": "<>dfpsfspub002" }, "skuName": { "value": "Standard_D2s_v3" @@ -677,19 +647,19 @@ module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep ] }, "diagnosticEventHubAuthorizationRuleId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey" + "value": "" }, "diagnosticEventHubName": { - "value": "adp-<>-az-evh-x-001" + "value": "" }, "diagnosticLogsRetentionInDays": { "value": 7 }, "diagnosticStorageAccountId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001" + "value": "" }, "diagnosticWorkspaceId": { - "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001" + "value": "" }, "firewallRules": { "value": [ @@ -717,7 +687,7 @@ module flexibleServers './Microsoft.DBforPostgreSQL/flexibleServers/deploy.bicep "value": "SameZone" }, "location": { - "value": "westeurope" + "value": "" }, "storageSizeGB": { "value": 1024