Azure / bicep

Bicep is a declarative language for describing and deploying Azure resources
MIT License
3.23k stars 748 forks source link

Deployment Pane: Deploy BlobStorage Replication pOlicy #15392

Open rads18 opened 3 hours ago

rads18 commented 3 hours ago

Hello team,

The replication policy consistently fails for object replication looking for PolicyID which is expected to be readonly. In addition both validation and What-If runs are clean. Please advise

t4ycgazmg7dxqeastus/childresource
Microsoft.Storage/storageAccounts/objectReplicationPolicies
Create
Failed
{
  "status": "Failed",
  "error": {
    "code": "InvalidRequestPropertyValue",
    "message": "The value 'childresource' is not allowed for property policyId."
  }
}

The source bicep code snippet:

resource dtobjReplication 'Microsoft.Storage/storageAccounts/objectReplicationPolicies@2023-05-01' = {
  name: 'childresource' 
  parent: storageAccounts_blob_resource[0]
  properties: {
    destinationAccount: storageAccounts_blob_resource[1].id
    rules: [
      {
        destinationContainer: 'scripts'
        sourceContainer: 'scripts'
      }
    ]
    sourceAccount: storageAccounts_blob_resource[0].id
  }
  dependsOn: [
    container
  ]
}
rads18 commented 3 hours ago

per: https://learn.microsoft.com/en-us/azure/templates/microsoft.storage/storageaccounts/objectreplicationpolicies?pivots=deployment-language-bicep

name is just a string and i dont see any key for policyId under properties. Please suggest!