azure-policy icon indicating copy to clipboard operation
azure-policy copied to clipboard

Alias request: Microsoft.Storage/storageAccounts/encryption.KeySource

Open jugheadny opened this issue 8 years ago • 1 comments

Scenario Need to use Azure Policy to deny creation of Storage Accounts with Microsoft Controlled Keys

Definition

    {
        "properties": {
            "displayName": "Only allow creation of Storage accounts with client controlled keys",
            "description": "Only allow creation of Storage accounts with client controlled keys",
            "parameters": {
            },
            "policyRule": {
                "if": {
                    "allOf": [
                        {
                            "field": "type",
                            "equals": "Microsoft.Storage/storageAccounts"
                        },
                        {
                            "not": {
                                "allOf": [
                                    {
                                        "field": "Microsoft.Storage/storageAccounts/encryption.KeySource",
                                        "equals": "Microsoft.Storage"
                                    }
                                ]
                            }
                        }
                    ]
                },
                "then": {
                    "effect": "deny"
                }
            }
        }
    }

jugheadny avatar May 16 '18 21:05 jugheadny

The aliases below this property (and other storageAccounts properties) have been added. Please give it a try.

mentat9 avatar Oct 26 '18 00:10 mentat9