diff --git a/modules/storage/storage-account/blob-service/README.md b/modules/storage/storage-account/blob-service/README.md index 319a320e0b..6e8044ec03 100644 --- a/modules/storage/storage-account/blob-service/README.md +++ b/modules/storage/storage-account/blob-service/README.md @@ -47,7 +47,7 @@ This module deploys a Storage Account Blob Service. | [`enableDefaultTelemetry`](#parameter-enabledefaulttelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). | | [`isVersioningEnabled`](#parameter-isversioningenabled) | bool | Use versioning to automatically maintain previous versions of your blobs. | | [`lastAccessTimeTrackingPolicyEnabled`](#parameter-lastaccesstimetrackingpolicyenabled) | bool | The blob service property to configure last access time based tracking policy. When set to true last access time based tracking is enabled. | -| [`restorePolicyDays`](#parameter-restorepolicydays) | int | how long this blob can be restored. It should be less than DeleteRetentionPolicy days. | +| [`restorePolicyDays`](#parameter-restorepolicydays) | int | How long this blob can be restored. It should be less than DeleteRetentionPolicy days. | | [`restorePolicyEnabled`](#parameter-restorepolicyenabled) | bool | The blob service properties for blob restore policy. If point-in-time restore is enabled, then versioning, change feed, and blob soft delete must also be enabled. | ### Parameter: `automaticSnapshotPolicyEnabled` @@ -69,7 +69,6 @@ The blob service properties for change feed events. Indicates whether change fee Indicates whether change feed event logging is enabled for the Blob service. Indicates the duration of changeFeed retention in days. A "0" value indicates an infinite retention of the change feed. - Required: No - Type: int -- Default: `7` ### Parameter: `containerDeleteRetentionPolicyAllowPermanentDelete` @@ -83,7 +82,6 @@ This property when set to true allows deletion of the soft deleted blob versions Indicates the number of days that the deleted item should be retained. - Required: No - Type: int -- Default: `7` ### Parameter: `containerDeleteRetentionPolicyEnabled` @@ -125,7 +123,6 @@ This property when set to true allows deletion of the soft deleted blob versions Indicates the number of days that the deleted blob should be retained. - Required: No - Type: int -- Default: `7` ### Parameter: `deleteRetentionPolicyEnabled` @@ -272,10 +269,9 @@ The blob service property to configure last access time based tracking policy. W ### Parameter: `restorePolicyDays` -how long this blob can be restored. It should be less than DeleteRetentionPolicy days. +How long this blob can be restored. It should be less than DeleteRetentionPolicy days. - Required: No - Type: int -- Default: `6` ### Parameter: `restorePolicyEnabled` diff --git a/modules/storage/storage-account/blob-service/container/immutability-policy/main.json b/modules/storage/storage-account/blob-service/container/immutability-policy/main.json index 8f5f095161..1e1265cebb 100644 --- a/modules/storage/storage-account/blob-service/container/immutability-policy/main.json +++ b/modules/storage/storage-account/blob-service/container/immutability-policy/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "5294108325383402237" + "version": "0.23.1.45101", + "templateHash": "11642031800707172818" }, "name": "Storage Account Blob Container Immutability Policies", "description": "This module deploys a Storage Account Blob Container Immutability Policy.", diff --git a/modules/storage/storage-account/blob-service/container/main.json b/modules/storage/storage-account/blob-service/container/main.json index 9eea0c53ae..c3e17f7ae9 100644 --- a/modules/storage/storage-account/blob-service/container/main.json +++ b/modules/storage/storage-account/blob-service/container/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "15140230336138320985" + "version": "0.23.1.45101", + "templateHash": "11413707823135400961" }, "name": "Storage Account Blob Containers", "description": "This module deploys a Storage Account Blob Container.", @@ -302,8 +302,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "5294108325383402237" + "version": "0.23.1.45101", + "templateHash": "11642031800707172818" }, "name": "Storage Account Blob Container Immutability Policies", "description": "This module deploys a Storage Account Blob Container Immutability Policy.", diff --git a/modules/storage/storage-account/blob-service/main.bicep b/modules/storage/storage-account/blob-service/main.bicep index 21f02d6049..114c0ece36 100644 --- a/modules/storage/storage-account/blob-service/main.bicep +++ b/modules/storage/storage-account/blob-service/main.bicep @@ -15,7 +15,7 @@ param changeFeedEnabled bool = true @minValue(0) @maxValue(146000) @description('Optional. Indicates whether change feed event logging is enabled for the Blob service. Indicates the duration of changeFeed retention in days. A "0" value indicates an infinite retention of the change feed.') -param changeFeedRetentionInDays int = 7 +param changeFeedRetentionInDays int? @description('Optional. The blob service properties for container soft delete. Indicates whether DeleteRetentionPolicy is enabled.') param containerDeleteRetentionPolicyEnabled bool = true @@ -23,7 +23,7 @@ param containerDeleteRetentionPolicyEnabled bool = true @minValue(1) @maxValue(365) @description('Optional. Indicates the number of days that the deleted item should be retained.') -param containerDeleteRetentionPolicyDays int = 7 +param containerDeleteRetentionPolicyDays int? @description('Optional. This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be used with blob restore policy. This property only applies to blob service and does not apply to containers or file share.') param containerDeleteRetentionPolicyAllowPermanentDelete bool = false @@ -40,7 +40,7 @@ param deleteRetentionPolicyEnabled bool = true @minValue(1) @maxValue(365) @description('Optional. Indicates the number of days that the deleted blob should be retained.') -param deleteRetentionPolicyDays int = 7 +param deleteRetentionPolicyDays int? @description('Optional. This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be used with blob restore policy. This property only applies to blob service and does not apply to containers or file share.') param deleteRetentionPolicyAllowPermanentDelete bool = false @@ -55,8 +55,8 @@ param lastAccessTimeTrackingPolicyEnabled bool = false param restorePolicyEnabled bool = true @minValue(1) -@description('Optional. how long this blob can be restored. It should be less than DeleteRetentionPolicy days.') -param restorePolicyDays int = 6 +@description('Optional. How long this blob can be restored. It should be less than DeleteRetentionPolicy days.') +param restorePolicyDays int? @description('Optional. Blob containers to create.') param containers array = [] @@ -93,13 +93,13 @@ resource blobServices 'Microsoft.Storage/storageAccounts/blobServices@2022-09-01 parent: storageAccount properties: { automaticSnapshotPolicyEnabled: automaticSnapshotPolicyEnabled - changeFeed: { - enabled: changeFeedEnabled - retentionInDays: changeFeedEnabled == true ? (changeFeedRetentionInDays != 0 ? changeFeedRetentionInDays : null) : null - } + changeFeed: changeFeedEnabled ? { + enabled: true + retentionInDays: changeFeedRetentionInDays + } : null containerDeleteRetentionPolicy: { enabled: containerDeleteRetentionPolicyEnabled - days: containerDeleteRetentionPolicyEnabled == true ? containerDeleteRetentionPolicyDays : null + days: containerDeleteRetentionPolicyDays allowPermanentDelete: containerDeleteRetentionPolicyEnabled == true ? containerDeleteRetentionPolicyAllowPermanentDelete : null } cors: { @@ -108,7 +108,7 @@ resource blobServices 'Microsoft.Storage/storageAccounts/blobServices@2022-09-01 defaultServiceVersion: !empty(defaultServiceVersion) ? defaultServiceVersion : null deleteRetentionPolicy: { enabled: deleteRetentionPolicyEnabled - days: deleteRetentionPolicyEnabled == true ? deleteRetentionPolicyDays : null + days: deleteRetentionPolicyDays allowPermanentDelete: deleteRetentionPolicyEnabled && deleteRetentionPolicyAllowPermanentDelete ? true : null } isVersioningEnabled: isVersioningEnabled @@ -117,10 +117,10 @@ resource blobServices 'Microsoft.Storage/storageAccounts/blobServices@2022-09-01 name: lastAccessTimeTrackingPolicyEnabled == true ? 'AccessTimeTracking' : null trackingGranularityInDays: lastAccessTimeTrackingPolicyEnabled == true ? 1 : null } - restorePolicy: { - enabled: restorePolicyEnabled - days: restorePolicyEnabled == true ? restorePolicyDays : null - } + restorePolicy: restorePolicyEnabled ? { + enabled: true + days: restorePolicyDays + } : null } } diff --git a/modules/storage/storage-account/blob-service/main.json b/modules/storage/storage-account/blob-service/main.json index fe57c8019f..0635d9a154 100644 --- a/modules/storage/storage-account/blob-service/main.json +++ b/modules/storage/storage-account/blob-service/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "3026533312164325767" + "version": "0.23.1.45101", + "templateHash": "18255279964987657305" }, "name": "Storage Account blob Services", "description": "This module deploys a Storage Account Blob Service.", @@ -144,7 +144,7 @@ }, "changeFeedRetentionInDays": { "type": "int", - "defaultValue": 7, + "nullable": true, "minValue": 0, "maxValue": 146000, "metadata": { @@ -160,7 +160,7 @@ }, "containerDeleteRetentionPolicyDays": { "type": "int", - "defaultValue": 7, + "nullable": true, "minValue": 1, "maxValue": 365, "metadata": { @@ -197,7 +197,7 @@ }, "deleteRetentionPolicyDays": { "type": "int", - "defaultValue": 7, + "nullable": true, "minValue": 1, "maxValue": 365, "metadata": { @@ -234,10 +234,10 @@ }, "restorePolicyDays": { "type": "int", - "defaultValue": 6, + "nullable": true, "minValue": 1, "metadata": { - "description": "Optional. how long this blob can be restored. It should be less than DeleteRetentionPolicy days." + "description": "Optional. How long this blob can be restored. It should be less than DeleteRetentionPolicy days." } }, "containers": { @@ -292,13 +292,10 @@ "name": "[format('{0}/{1}', parameters('storageAccountName'), variables('name'))]", "properties": { "automaticSnapshotPolicyEnabled": "[parameters('automaticSnapshotPolicyEnabled')]", - "changeFeed": { - "enabled": "[parameters('changeFeedEnabled')]", - "retentionInDays": "[if(equals(parameters('changeFeedEnabled'), true()), if(not(equals(parameters('changeFeedRetentionInDays'), 0)), parameters('changeFeedRetentionInDays'), null()), null())]" - }, + "changeFeed": "[if(parameters('changeFeedEnabled'), createObject('enabled', true(), 'retentionInDays', parameters('changeFeedRetentionInDays')), null())]", "containerDeleteRetentionPolicy": { "enabled": "[parameters('containerDeleteRetentionPolicyEnabled')]", - "days": "[if(equals(parameters('containerDeleteRetentionPolicyEnabled'), true()), parameters('containerDeleteRetentionPolicyDays'), null())]", + "days": "[parameters('containerDeleteRetentionPolicyDays')]", "allowPermanentDelete": "[if(equals(parameters('containerDeleteRetentionPolicyEnabled'), true()), parameters('containerDeleteRetentionPolicyAllowPermanentDelete'), null())]" }, "cors": { @@ -307,7 +304,7 @@ "defaultServiceVersion": "[if(not(empty(parameters('defaultServiceVersion'))), parameters('defaultServiceVersion'), null())]", "deleteRetentionPolicy": { "enabled": "[parameters('deleteRetentionPolicyEnabled')]", - "days": "[if(equals(parameters('deleteRetentionPolicyEnabled'), true()), parameters('deleteRetentionPolicyDays'), null())]", + "days": "[parameters('deleteRetentionPolicyDays')]", "allowPermanentDelete": "[if(and(parameters('deleteRetentionPolicyEnabled'), parameters('deleteRetentionPolicyAllowPermanentDelete')), true(), null())]" }, "isVersioningEnabled": "[parameters('isVersioningEnabled')]", @@ -316,10 +313,7 @@ "name": "[if(equals(parameters('lastAccessTimeTrackingPolicyEnabled'), true()), 'AccessTimeTracking', null())]", "trackingGranularityInDays": "[if(equals(parameters('lastAccessTimeTrackingPolicyEnabled'), true()), 1, null())]" }, - "restorePolicy": { - "enabled": "[parameters('restorePolicyEnabled')]", - "days": "[if(equals(parameters('restorePolicyEnabled'), true()), parameters('restorePolicyDays'), null())]" - } + "restorePolicy": "[if(parameters('restorePolicyEnabled'), createObject('enabled', true(), 'days', parameters('restorePolicyDays')), null())]" }, "dependsOn": [ "storageAccount" @@ -388,8 +382,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "15140230336138320985" + "version": "0.23.1.45101", + "templateHash": "11413707823135400961" }, "name": "Storage Account Blob Containers", "description": "This module deploys a Storage Account Blob Container.", @@ -685,8 +679,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "5294108325383402237" + "version": "0.23.1.45101", + "templateHash": "11642031800707172818" }, "name": "Storage Account Blob Container Immutability Policies", "description": "This module deploys a Storage Account Blob Container Immutability Policy.", diff --git a/modules/storage/storage-account/file-service/main.json b/modules/storage/storage-account/file-service/main.json index 0c3f269cbc..204b5b8f35 100644 --- a/modules/storage/storage-account/file-service/main.json +++ b/modules/storage/storage-account/file-service/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "5811848536316127521" + "version": "0.23.1.45101", + "templateHash": "6280006322501716234" }, "name": "Storage Account File Share Services", "description": "This module deploys a Storage Account File Share Service.", @@ -271,8 +271,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "6928373168012003070" + "version": "0.23.1.45101", + "templateHash": "15538733704323873805" }, "name": "Storage Account File Shares", "description": "This module deploys a Storage Account File Share.", diff --git a/modules/storage/storage-account/file-service/share/main.json b/modules/storage/storage-account/file-service/share/main.json index 99d21e926d..a3fcfe5179 100644 --- a/modules/storage/storage-account/file-service/share/main.json +++ b/modules/storage/storage-account/file-service/share/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "6928373168012003070" + "version": "0.23.1.45101", + "templateHash": "15538733704323873805" }, "name": "Storage Account File Shares", "description": "This module deploys a Storage Account File Share.", diff --git a/modules/storage/storage-account/local-user/main.json b/modules/storage/storage-account/local-user/main.json index 274d270140..aa6273caf6 100644 --- a/modules/storage/storage-account/local-user/main.json +++ b/modules/storage/storage-account/local-user/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "17857562856314258952" + "version": "0.23.1.45101", + "templateHash": "11792662730124549359" }, "name": "Storage Account Local Users", "description": "This module deploys a Storage Account Local User, which is used for SFTP authentication.", diff --git a/modules/storage/storage-account/main.bicep b/modules/storage/storage-account/main.bicep index 5c567942e0..2c8f1cdacb 100644 --- a/modules/storage/storage-account/main.bicep +++ b/modules/storage/storage-account/main.bicep @@ -402,19 +402,19 @@ module storageAccount_blobServices 'blob-service/main.bicep' = if (!empty(blobSe containers: contains(blobServices, 'containers') ? blobServices.containers : [] automaticSnapshotPolicyEnabled: contains(blobServices, 'automaticSnapshotPolicyEnabled') ? blobServices.automaticSnapshotPolicyEnabled : false changeFeedEnabled: contains(blobServices, 'changeFeedEnabled') ? blobServices.changeFeedEnabled : false - changeFeedRetentionInDays: contains(blobServices, 'changeFeedRetentionInDays') ? blobServices.changeFeedRetentionInDays : 7 + changeFeedRetentionInDays: blobServices.?changeFeedRetentionInDays containerDeleteRetentionPolicyEnabled: contains(blobServices, 'containerDeleteRetentionPolicyEnabled') ? blobServices.containerDeleteRetentionPolicyEnabled : false - containerDeleteRetentionPolicyDays: contains(blobServices, 'containerDeleteRetentionPolicyDays') ? blobServices.containerDeleteRetentionPolicyDays : 7 + containerDeleteRetentionPolicyDays: blobServices.?containerDeleteRetentionPolicyDays containerDeleteRetentionPolicyAllowPermanentDelete: contains(blobServices, 'containerDeleteRetentionPolicyAllowPermanentDelete') ? blobServices.containerDeleteRetentionPolicyAllowPermanentDelete : false corsRules: contains(blobServices, 'corsRules') ? blobServices.corsRules : [] defaultServiceVersion: contains(blobServices, 'defaultServiceVersion') ? blobServices.defaultServiceVersion : '' deleteRetentionPolicyAllowPermanentDelete: contains(blobServices, 'deleteRetentionPolicyAllowPermanentDelete') ? blobServices.deleteRetentionPolicyAllowPermanentDelete : false deleteRetentionPolicyEnabled: contains(blobServices, 'deleteRetentionPolicyEnabled') ? blobServices.deleteRetentionPolicyEnabled : false - deleteRetentionPolicyDays: contains(blobServices, 'deleteRetentionPolicyDays') ? blobServices.deleteRetentionPolicyDays : 7 + deleteRetentionPolicyDays: blobServices.?deleteRetentionPolicyDays isVersioningEnabled: contains(blobServices, 'isVersioningEnabled') ? blobServices.isVersioningEnabled : false lastAccessTimeTrackingPolicyEnabled: contains(blobServices, 'lastAccessTimeTrackingPolicyEnabled') ? blobServices.lastAccessTimeTrackingPolicyEnabled : false restorePolicyEnabled: contains(blobServices, 'restorePolicyEnabled') ? blobServices.restorePolicyEnabled : false - restorePolicyDays: contains(blobServices, 'restorePolicyDays') ? blobServices.restorePolicyDays : 6 + restorePolicyDays: blobServices.?restorePolicyDays diagnosticSettings: blobServices.?diagnosticSettings enableDefaultTelemetry: enableReferencedModulesTelemetry } diff --git a/modules/storage/storage-account/main.json b/modules/storage/storage-account/main.json index 10bde8951b..1eb678c07d 100644 --- a/modules/storage/storage-account/main.json +++ b/modules/storage/storage-account/main.json @@ -6,7 +6,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "12303802246802299756" + "templateHash": "7782694235197058482" }, "name": "Storage Accounts", "description": "This module deploys a Storage Account.", @@ -1833,19 +1833,27 @@ "containers": "[if(contains(parameters('blobServices'), 'containers'), createObject('value', parameters('blobServices').containers), createObject('value', createArray()))]", "automaticSnapshotPolicyEnabled": "[if(contains(parameters('blobServices'), 'automaticSnapshotPolicyEnabled'), createObject('value', parameters('blobServices').automaticSnapshotPolicyEnabled), createObject('value', false()))]", "changeFeedEnabled": "[if(contains(parameters('blobServices'), 'changeFeedEnabled'), createObject('value', parameters('blobServices').changeFeedEnabled), createObject('value', false()))]", - "changeFeedRetentionInDays": "[if(contains(parameters('blobServices'), 'changeFeedRetentionInDays'), createObject('value', parameters('blobServices').changeFeedRetentionInDays), createObject('value', 7))]", + "changeFeedRetentionInDays": { + "value": "[tryGet(parameters('blobServices'), 'changeFeedRetentionInDays')]" + }, "containerDeleteRetentionPolicyEnabled": "[if(contains(parameters('blobServices'), 'containerDeleteRetentionPolicyEnabled'), createObject('value', parameters('blobServices').containerDeleteRetentionPolicyEnabled), createObject('value', false()))]", - "containerDeleteRetentionPolicyDays": "[if(contains(parameters('blobServices'), 'containerDeleteRetentionPolicyDays'), createObject('value', parameters('blobServices').containerDeleteRetentionPolicyDays), createObject('value', 7))]", + "containerDeleteRetentionPolicyDays": { + "value": "[tryGet(parameters('blobServices'), 'containerDeleteRetentionPolicyDays')]" + }, "containerDeleteRetentionPolicyAllowPermanentDelete": "[if(contains(parameters('blobServices'), 'containerDeleteRetentionPolicyAllowPermanentDelete'), createObject('value', parameters('blobServices').containerDeleteRetentionPolicyAllowPermanentDelete), createObject('value', false()))]", "corsRules": "[if(contains(parameters('blobServices'), 'corsRules'), createObject('value', parameters('blobServices').corsRules), createObject('value', createArray()))]", "defaultServiceVersion": "[if(contains(parameters('blobServices'), 'defaultServiceVersion'), createObject('value', parameters('blobServices').defaultServiceVersion), createObject('value', ''))]", "deleteRetentionPolicyAllowPermanentDelete": "[if(contains(parameters('blobServices'), 'deleteRetentionPolicyAllowPermanentDelete'), createObject('value', parameters('blobServices').deleteRetentionPolicyAllowPermanentDelete), createObject('value', false()))]", "deleteRetentionPolicyEnabled": "[if(contains(parameters('blobServices'), 'deleteRetentionPolicyEnabled'), createObject('value', parameters('blobServices').deleteRetentionPolicyEnabled), createObject('value', false()))]", - "deleteRetentionPolicyDays": "[if(contains(parameters('blobServices'), 'deleteRetentionPolicyDays'), createObject('value', parameters('blobServices').deleteRetentionPolicyDays), createObject('value', 7))]", + "deleteRetentionPolicyDays": { + "value": "[tryGet(parameters('blobServices'), 'deleteRetentionPolicyDays')]" + }, "isVersioningEnabled": "[if(contains(parameters('blobServices'), 'isVersioningEnabled'), createObject('value', parameters('blobServices').isVersioningEnabled), createObject('value', false()))]", "lastAccessTimeTrackingPolicyEnabled": "[if(contains(parameters('blobServices'), 'lastAccessTimeTrackingPolicyEnabled'), createObject('value', parameters('blobServices').lastAccessTimeTrackingPolicyEnabled), createObject('value', false()))]", "restorePolicyEnabled": "[if(contains(parameters('blobServices'), 'restorePolicyEnabled'), createObject('value', parameters('blobServices').restorePolicyEnabled), createObject('value', false()))]", - "restorePolicyDays": "[if(contains(parameters('blobServices'), 'restorePolicyDays'), createObject('value', parameters('blobServices').restorePolicyDays), createObject('value', 6))]", + "restorePolicyDays": { + "value": "[tryGet(parameters('blobServices'), 'restorePolicyDays')]" + }, "diagnosticSettings": { "value": "[tryGet(parameters('blobServices'), 'diagnosticSettings')]" }, @@ -1861,7 +1869,7 @@ "_generator": { "name": "bicep", "version": "0.23.1.45101", - "templateHash": "2468823120254808431" + "templateHash": "18255279964987657305" }, "name": "Storage Account blob Services", "description": "This module deploys a Storage Account Blob Service.", @@ -1999,7 +2007,7 @@ }, "changeFeedRetentionInDays": { "type": "int", - "defaultValue": 7, + "nullable": true, "minValue": 0, "maxValue": 146000, "metadata": { @@ -2015,7 +2023,7 @@ }, "containerDeleteRetentionPolicyDays": { "type": "int", - "defaultValue": 7, + "nullable": true, "minValue": 1, "maxValue": 365, "metadata": { @@ -2052,7 +2060,7 @@ }, "deleteRetentionPolicyDays": { "type": "int", - "defaultValue": 7, + "nullable": true, "minValue": 1, "maxValue": 365, "metadata": { @@ -2089,10 +2097,10 @@ }, "restorePolicyDays": { "type": "int", - "defaultValue": 6, + "nullable": true, "minValue": 1, "metadata": { - "description": "Optional. how long this blob can be restored. It should be less than DeleteRetentionPolicy days." + "description": "Optional. How long this blob can be restored. It should be less than DeleteRetentionPolicy days." } }, "containers": { @@ -2147,13 +2155,10 @@ "name": "[format('{0}/{1}', parameters('storageAccountName'), variables('name'))]", "properties": { "automaticSnapshotPolicyEnabled": "[parameters('automaticSnapshotPolicyEnabled')]", - "changeFeed": { - "enabled": "[parameters('changeFeedEnabled')]", - "retentionInDays": "[if(equals(parameters('changeFeedEnabled'), true()), if(not(equals(parameters('changeFeedRetentionInDays'), 0)), parameters('changeFeedRetentionInDays'), null()), null())]" - }, + "changeFeed": "[if(parameters('changeFeedEnabled'), createObject('enabled', true(), 'retentionInDays', parameters('changeFeedRetentionInDays')), null())]", "containerDeleteRetentionPolicy": { "enabled": "[parameters('containerDeleteRetentionPolicyEnabled')]", - "days": "[if(equals(parameters('containerDeleteRetentionPolicyEnabled'), true()), parameters('containerDeleteRetentionPolicyDays'), null())]", + "days": "[parameters('containerDeleteRetentionPolicyDays')]", "allowPermanentDelete": "[if(equals(parameters('containerDeleteRetentionPolicyEnabled'), true()), parameters('containerDeleteRetentionPolicyAllowPermanentDelete'), null())]" }, "cors": { @@ -2162,7 +2167,7 @@ "defaultServiceVersion": "[if(not(empty(parameters('defaultServiceVersion'))), parameters('defaultServiceVersion'), null())]", "deleteRetentionPolicy": { "enabled": "[parameters('deleteRetentionPolicyEnabled')]", - "days": "[if(equals(parameters('deleteRetentionPolicyEnabled'), true()), parameters('deleteRetentionPolicyDays'), null())]", + "days": "[parameters('deleteRetentionPolicyDays')]", "allowPermanentDelete": "[if(and(parameters('deleteRetentionPolicyEnabled'), parameters('deleteRetentionPolicyAllowPermanentDelete')), true(), null())]" }, "isVersioningEnabled": "[parameters('isVersioningEnabled')]", @@ -2171,10 +2176,7 @@ "name": "[if(equals(parameters('lastAccessTimeTrackingPolicyEnabled'), true()), 'AccessTimeTracking', null())]", "trackingGranularityInDays": "[if(equals(parameters('lastAccessTimeTrackingPolicyEnabled'), true()), 1, null())]" }, - "restorePolicy": { - "enabled": "[parameters('restorePolicyEnabled')]", - "days": "[if(equals(parameters('restorePolicyEnabled'), true()), parameters('restorePolicyDays'), null())]" - } + "restorePolicy": "[if(parameters('restorePolicyEnabled'), createObject('enabled', true(), 'days', parameters('restorePolicyDays')), null())]" }, "dependsOn": [ "storageAccount" diff --git a/modules/storage/storage-account/management-policy/main.json b/modules/storage/storage-account/management-policy/main.json index f559e2b86a..ab33a27862 100644 --- a/modules/storage/storage-account/management-policy/main.json +++ b/modules/storage/storage-account/management-policy/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "7686888659208772167" + "version": "0.23.1.45101", + "templateHash": "9776092818963506976" }, "name": "Storage Account Management Policies", "description": "This module deploys a Storage Account Management Policy.", diff --git a/modules/storage/storage-account/queue-service/main.json b/modules/storage/storage-account/queue-service/main.json index 95aa83129a..5e5e605312 100644 --- a/modules/storage/storage-account/queue-service/main.json +++ b/modules/storage/storage-account/queue-service/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "6394050552796909716" + "version": "0.23.1.45101", + "templateHash": "1159938655127712786" }, "name": "Storage Account Queue Services", "description": "This module deploys a Storage Account Queue Service.", @@ -239,8 +239,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "13802487373528262992" + "version": "0.23.1.45101", + "templateHash": "6271299191275064402" }, "name": "Storage Account Queues", "description": "This module deploys a Storage Account Queue.", diff --git a/modules/storage/storage-account/queue-service/queue/main.json b/modules/storage/storage-account/queue-service/queue/main.json index 60d8e0c5bb..46144b8293 100644 --- a/modules/storage/storage-account/queue-service/queue/main.json +++ b/modules/storage/storage-account/queue-service/queue/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "13802487373528262992" + "version": "0.23.1.45101", + "templateHash": "6271299191275064402" }, "name": "Storage Account Queues", "description": "This module deploys a Storage Account Queue.", diff --git a/modules/storage/storage-account/table-service/main.json b/modules/storage/storage-account/table-service/main.json index 4bde0ded71..a5c64493b1 100644 --- a/modules/storage/storage-account/table-service/main.json +++ b/modules/storage/storage-account/table-service/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "15951116507662113563" + "version": "0.23.1.45101", + "templateHash": "4505205701529964174" }, "name": "Storage Account Table Services", "description": "This module deploys a Storage Account Table Service.", @@ -236,8 +236,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "2215203998686662901" + "version": "0.23.1.45101", + "templateHash": "10703796356093627612" }, "name": "Storage Account Table", "description": "This module deploys a Storage Account Table.", diff --git a/modules/storage/storage-account/table-service/table/main.json b/modules/storage/storage-account/table-service/table/main.json index 62a6eae7ba..07b25e405f 100644 --- a/modules/storage/storage-account/table-service/table/main.json +++ b/modules/storage/storage-account/table-service/table/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.22.6.54827", - "templateHash": "2215203998686662901" + "version": "0.23.1.45101", + "templateHash": "10703796356093627612" }, "name": "Storage Account Table", "description": "This module deploys a Storage Account Table.",