I am trying to deploy storage account which is getting deployed succesfully first time but when I try to re-deploy it ,it fails and complains about default blob deployment pre-condition failed for following section of the bicep template
resource blob_default 'Microsoft.Storage/storageAccounts/blobServices@2021-04-01' = {
name: 'default'
parent: stg
properties: {
changeFeed: {
enabled: true
}
restorePolicy : {
enabled: true
days: 6
}
containerDeleteRetentionPolicy: {
enabled: true
days: 7
}
cors: {
corsRules: []
}
deleteRetentionPolicy: {
enabled: true
days: 7
}
isVersioningEnabled: true
}
}
this child blob resource is part of storage account deployment template and it is failure cause in overall deployment of storage account with error message
{ "status": "Failed", "error": { "code": "ContainerOperationFailure", "message": "The condition specified using HTTP conditional header(s) is not met.\nRequestId:5d03a3d7-e01e-0052-65d4-a8f390000000\nTime:2021-09-13T19:20:18.8705109Z" } }