Skip to content

Commit 6d23261

Browse files
Add enablePurgeProtection parameter to Bicep and JSON templates
1 parent d7c33c6 commit 6d23261

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

infra/main.bicep

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ param enableRedundancy bool = false
7979
@description('Optional. Enable scalability for applicable resources, aligned with the Well Architected Framework recommendations. Defaults to false.')
8080
param enableScalability bool = false
8181

82+
@description('Optional. Enable purge protection. Defaults to false.')
83+
param enablePurgeProtection bool = false
84+
8285
@description('Optional. Tags to be applied to the resources.')
8386
param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags = {
8487
app: 'Content Processing Solution Accelerator'
@@ -987,7 +990,7 @@ module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6
987990
params: {
988991
name: 'appcs-${solutionSuffix}'
989992
location: resourceGroupLocation
990-
enablePurgeProtection: false
993+
enablePurgeProtection: enablePurgeProtection
991994
tags: {
992995
app: solutionSuffix
993996
location: resourceGroupLocation

infra/main.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.37.4.10188",
9-
"templateHash": "14259315155038248870"
9+
"templateHash": "5583509537249625128"
1010
},
1111
"name": "Content Processing Solution Accelerator",
1212
"description": "Bicep template to deploy the Content Processing Solution Accelerator with AVM compliance."
@@ -154,6 +154,13 @@
154154
"description": "Optional. Enable scalability for applicable resources, aligned with the Well Architected Framework recommendations. Defaults to false."
155155
}
156156
},
157+
"enablePurgeProtection": {
158+
"type": "bool",
159+
"defaultValue": false,
160+
"metadata": {
161+
"description": "Optional. Enable purge protection. Defaults to false."
162+
}
163+
},
157164
"tags": {
158165
"type": "object",
159166
"metadata": {
@@ -20454,7 +20461,7 @@
2045420461
"_generator": {
2045520462
"name": "bicep",
2045620463
"version": "0.37.4.10188",
20457-
"templateHash": "16080670397776921948"
20464+
"templateHash": "251116960322750261"
2045820465
},
2045920466
"name": "Key Vault Module"
2046020467
},
@@ -20625,13 +20632,7 @@
2062520632
"enableTelemetry": {
2062620633
"value": "[parameters('enableTelemetry')]"
2062720634
},
20628-
"diagnosticSettings": {
20629-
"value": [
20630-
{
20631-
"workspaceResourceId": "[parameters('logAnalyticsWorkspaceResourceId')]"
20632-
}
20633-
]
20634-
},
20635+
"diagnosticSettings": "[if(empty(parameters('logAnalyticsWorkspaceResourceId')), createObject('value', null()), createObject('value', createArray(createObject('workspaceResourceId', parameters('logAnalyticsWorkspaceResourceId')))))]",
2063520636
"networkAcls": {
2063620637
"value": "[parameters('networkAcls')]"
2063720638
}
@@ -32967,8 +32968,8 @@
3296732968
"avmContainerApp",
3296832969
"avmContainerApp_API",
3296932970
"avmManagedIdentity",
32970-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
3297132971
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]",
32972+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
3297232973
"virtualNetwork"
3297332974
]
3297432975
},
@@ -38710,8 +38711,8 @@
3871038711
"avmContainerApp",
3871138712
"avmManagedIdentity",
3871238713
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
38713-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
3871438714
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
38715+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
3871538716
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').contentUnderstanding)]",
3871638717
"logAnalyticsWorkspace",
3871738718
"virtualNetwork"
@@ -41050,8 +41051,8 @@
4105041051
"dependsOn": [
4105141052
"avmContainerApp",
4105241053
"avmManagedIdentity",
41053-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').contentUnderstanding)]",
4105441054
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
41055+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').contentUnderstanding)]",
4105541056
"virtualNetwork"
4105641057
]
4105741058
},
@@ -50947,7 +50948,7 @@
5094750948
"value": "[parameters('resourceGroupLocation')]"
5094850949
},
5094950950
"enablePurgeProtection": {
50950-
"value": false
50951+
"value": "[parameters('enablePurgeProtection')]"
5095150952
},
5095250953
"tags": {
5095350954
"value": {
@@ -58243,7 +58244,7 @@
5824358244
},
5824458245
"value": "[reference('avmContainerRegistry').outputs.loginServer.value]"
5824558246
},
58246-
"resourceGroupName": {
58247+
"AZURE_RESOURCE_GROUP": {
5824758248
"type": "string",
5824858249
"metadata": {
5824958250
"description": "The resource group the resources were deployed into."

0 commit comments

Comments
 (0)