Coder Perfect

Using bicep to establish storage container access policies in Azure


Can Bicep be used to perform the same tasks as this Azure CLI script?

az storage container policy create \
    --container-name $containerName \
    --name $policyName \
    --account-name $storageAccountName \
    --account-key $accountKey \
    --permissions $permissions \
    --start $policyStartTime \
    --expiry $policyEndTime

Asked by Caad9Rider

Solution #1


In ARM, this is not possible (see Azure Blob Storage Container Stored Access Policy with ARM). Bicep is merely a compiler that converts bicep code to ARM code, which is then utilized to carry out the deployment.

Answered by Miq

Post is based on