Coder Perfect

The preconditioning for the deployment of the storage account failed.

Problem

I’m trying to deploy a storage account that works OK the first time, but fails when I try to re-deploy it since the default blob deployment pre-condition failed for the following area 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 the storage account deployment template, and it is a failure reason in the overall storage account deployment, resulting in an error message.

Asked by anuj khosla

Post is based on https://stackoverflow.com/questions/69170245/precondition-failing-for-deployment-of-storage-account