Skip to content

ARM Template locks #444

Open
Open
@mattboothman

Description

@mattboothman

I'd like the ability to lock a keyvalue at creation and/or after creation.

Perhaps something like this (see .properties.locked):

{
    "type": "Microsoft.AppConfiguration/configurationStores/keyValues",
    "apiVersion": "2020-07-01-preview",
    "name": "[concat(variables('configStoreName'), '/environment:name')]",
    "dependsOn": [
        "[variables('configStoreName')]"
    ],
    "properties": {
        "value": "[parameters('environmentName')]",
        "contentType": "text/plain",
        "tags": "",
        "locked": true
    }
},

The alternative is that I'm able to apply resource locks to configuration keyvalues, but this would also be useful in addition to the above method.

{
    "type": "Microsoft.Authorization/locks",
    "apiVersion": "2016-09-01",
    "name": "environmentNameLock",
    "scope": "[resourceId('Microsoft.AppConfiguration/configurationStores/keyValues', variables('configStoreName'), 'environment:name')]",
    "dependsOn": [
        "[resourceId('Microsoft.AppConfiguration/configurationStores/keyValues', variables('configStoreName'), 'environment:name')]"
    ],
    "properties": {
        "level": "ReadOnly",
        "notes": "Config must not be modified or deleted."
    }
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions