1
votes

I want to be able to set the access keys of a azure storage account using an ARM Template. I have looked at the quick start templates which don't have any examples. This does not give me any examples: https://docs.microsoft.com/en-us/azure/templates/microsoft.storage/storageaccounts and googling reveals lots of examples of how to get the dynamically generated keys.

1
As Gaurav Mantri said, you could not use a custom account key. Do you want to template to generate access key? If yes, you could do this.Shui shengbao
No, I want to be able to set the key so I don't then have to update the key which is used in multiple places across multiple systems. What you are saying is basically I can never regenerate my server setup because the access keys will change.johnstaveley
As Gaurav Mantri said, currently, it is impossible.Shui shengbao
Major flaw with Azure infrastructure as code IMHO, I can set access keys for azure service bus but not blob storage? Why? Where do I complain? P.s. Thanks for your help, it is appreciated even if I'm not happy with the answer :)johnstaveley
{ "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", "name": "[variables('servicebus_AuthorizationRules_RootManageSharedAccessKey')]", "apiVersion": "2014-09-01", "scale": null, "properties": { "keyName": "RootManageSharedAccessKey", "claimType": "SharedAccessKey", "claimValue": "None", "primaryKey": "[parameters('managePrimaryKey')]", "secondaryKey": "[parameters('manageSecondaryKey')]", "rights": [ "Listen", "Manage", "Send" ETCjohnstaveley

1 Answers

1
votes

I want to be able to set the access keys of a azure storage account using an ARM Template.

Simple answer is that you can't. Currently Azure Storage Service generates access keys for you automatically. You can't choose/specify a custom account key.