last sync: 2025-May-02 19:26:58 UTC

Restrict cloud shell storage account creation

Community Policy definition

Source Repository Community-Policy GitHub
JSON Community-Policy GitHub
Deploy policy dab3c67a-5f00-47ec-bba6-cc6984c33ae0 (1.0.0) to Azure
Display name Restrict cloud shell storage account creation
Id dab3c67a-5f00-47ec-bba6-cc6984c33ae0
Version 1.0.0
Details on versioning
Category Storage
Microsoft Learn
Description Storage accounts that you create in Cloud Shell are tagged with ms-resource-usage:azure-cloud-shell. If you want to disallow users from creating storage accounts in Cloud Shell, create an Azure resource policy for tags that is triggered by this specific tag. https://learn.microsoft.com/en-us/azure/cloud-shell/persisting-shell-storage#restrict-resource-creation-with-an-azure-resource-policy
Mode All
Type Custom Community
Effect Default
Audit
Allowed
Deny, Audit, Disabled
RBAC role(s) none
Rule aliases
Rule resource types IF (1)
Microsoft.Storage/storageAccounts
JSON
EPAC
Deploy policy dab3c67a-5f00-47ec-bba6-cc6984c33ae0 (1.0.0) to Azure