diff --git a/modules/Microsoft.AppConfiguration/configurationStores/.test/parameters.json b/modules/Microsoft.AppConfiguration/configurationStores/.test/parameters.json index 5391a6db50..0b7490ea14 100644 --- a/modules/Microsoft.AppConfiguration/configurationStores/.test/parameters.json +++ b/modules/Microsoft.AppConfiguration/configurationStores/.test/parameters.json @@ -62,24 +62,8 @@ "enablePurgeProtection": { "value": false }, - "publicNetworkAccess": { - "value": "Enabled" - }, "softDeleteRetentionInDays": { "value": 1 - }, - "privateEndpoints": { - "value": [ - { - "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints", - "service": "configurationStores", - "privateDnsZoneGroup": { - "privateDNSResourceIds": [ - "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io" - ] - } - } - ] } } } diff --git a/modules/Microsoft.AppConfiguration/configurationStores/.test/pe.parameters.json b/modules/Microsoft.AppConfiguration/configurationStores/.test/pe.parameters.json new file mode 100644 index 0000000000..baab61d420 --- /dev/null +++ b/modules/Microsoft.AppConfiguration/configurationStores/.test/pe.parameters.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "<>-az-appc-pe-001" + }, + "createMode": { + "value": "Default" + }, + "disableLocalAuth": { + "value": false + }, + "enablePurgeProtection": { + "value": false + }, + "softDeleteRetentionInDays": { + "value": 1 + }, + "privateEndpoints": { + "value": [ + { + "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints", + "service": "configurationStores", + "privateDnsZoneGroup": { + "privateDNSResourceIds": [ + "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io" + ] + } + } + ] + } + } +} diff --git a/modules/Microsoft.AppConfiguration/configurationStores/deploy.bicep b/modules/Microsoft.AppConfiguration/configurationStores/deploy.bicep index d9734092e9..95f7e8fddd 100644 --- a/modules/Microsoft.AppConfiguration/configurationStores/deploy.bicep +++ b/modules/Microsoft.AppConfiguration/configurationStores/deploy.bicep @@ -156,7 +156,7 @@ resource configurationStore 'Microsoft.AppConfiguration/configurationStores@2021 createMode: createMode disableLocalAuth: disableLocalAuth enablePurgeProtection: sku == 'Free' ? false : enablePurgeProtection - publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : (!empty(privateEndpoints) ? 'Disabled' : null) + publicNetworkAccess: !empty(publicNetworkAccess) ? any(publicNetworkAccess) : null softDeleteRetentionInDays: sku == 'Free' ? 0 : softDeleteRetentionInDays } } diff --git a/modules/Microsoft.AppConfiguration/configurationStores/readme.md b/modules/Microsoft.AppConfiguration/configurationStores/readme.md index 07aea76b63..0ca1f373ad 100644 --- a/modules/Microsoft.AppConfiguration/configurationStores/readme.md +++ b/modules/Microsoft.AppConfiguration/configurationStores/readme.md @@ -356,18 +356,6 @@ module configurationStores './Microsoft.AppConfiguration/configurationStores/dep } ] lock: 'CanNotDelete' - privateEndpoints: [ - { - privateDnsZoneGroup: { - privateDNSResourceIds: [ - '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io' - ] - } - service: 'configurationStores' - subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints' - } - ] - publicNetworkAccess: 'Enabled' roleAssignments: [ { principalIds: [ @@ -443,22 +431,6 @@ module configurationStores './Microsoft.AppConfiguration/configurationStores/dep "lock": { "value": "CanNotDelete" }, - "privateEndpoints": { - "value": [ - { - "privateDnsZoneGroup": { - "privateDNSResourceIds": [ - "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io" - ] - }, - "service": "configurationStores", - "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints" - } - ] - }, - "publicNetworkAccess": { - "value": "Enabled" - }, "roleAssignments": { "value": [ { @@ -481,3 +453,84 @@ module configurationStores './Microsoft.AppConfiguration/configurationStores/dep

+ +

Example 3: Pe

+ +
+ +via Bicep module + +```bicep +module configurationStores './Microsoft.AppConfiguration/configurationStores/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-configurationStores' + params: { + // Required parameters + name: '<>-az-appc-pe-001' + // Non-required parameters + createMode: 'Default' + disableLocalAuth: false + enablePurgeProtection: false + privateEndpoints: [ + { + privateDnsZoneGroup: { + privateDNSResourceIds: [ + '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io' + ] + } + service: 'configurationStores' + subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints' + } + ] + softDeleteRetentionInDays: 1 + } +} +``` + +
+

+ +

+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + // Required parameters + "name": { + "value": "<>-az-appc-pe-001" + }, + // Non-required parameters + "createMode": { + "value": "Default" + }, + "disableLocalAuth": { + "value": false + }, + "enablePurgeProtection": { + "value": false + }, + "privateEndpoints": { + "value": [ + { + "privateDnsZoneGroup": { + "privateDNSResourceIds": [ + "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.azconfig.io" + ] + }, + "service": "configurationStores", + "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints" + } + ] + }, + "softDeleteRetentionInDays": { + "value": 1 + } + } +} +``` + +
+