Martin Brandl
Martin Brandl

Reputation: 58931

Provision Azure Redis Cache using ARM and specify Access Keys

I try to provision an Azure Redis Cache using an ARM template. This is working as expected with the exception that I can't specify the access keys.

Usually I work with the generated keys which is probably the recommended way - but in this case I wan't to provide thos keys within my deployment (for some legacy reasons).

Q: Is it possible to provide the access keys within an ARM template? Or can I set them after the deployment using PowerShell?

Here is a snippet of my ARM template:

 "resources": [
        {
            "type": "Microsoft.Cache/Redis",
            "name": "[parameters('myRedis_name')]",
            "apiVersion": "2016-04-01",
            "location": "West Europe",
            "tags": {},
            "properties": {
                "redisVersion": "3.2",
                "sku": {
                    "name": "Standard",
                    "family": "C",
                    "capacity": 1
                },
                "enableNonSslPort": false,
                "redisConfiguration": {
                    "maxclients": "1000",
                    "maxmemory-reserved": "50",
                    "maxmemory-delta": "50"
                }
            },
            "resources": [],
            "dependsOn": []
        },

Upvotes: 4

Views: 939

Answers (1)

David Makogon
David Makogon

Reputation: 71030

Just like Azure Storage keys (or DocumentDB keys, etc), you have no ability to specify the keys. You may either use what's provided or, at any time, regenerate the keys (either primary or secondary). This is how keys are managed, regardless whether using ARM or the portal. Here's a screengrab where you can see the regen options:

redis service keys

There's no way to enter a specific key of your own.

Upvotes: 3

Related Questions