I want to save it on my side (some DB) so in the future i could get data from the specific storage
arm template - send values from arm template when deployment finish?
hello,
I have an ARM template that creates a storage account. I want to get the storage account key after it is created. currently, I am using the arm template's output section and copy the storage key value after the deployment is finished from there manually.
I was wondering - is there a way to add to the ARM template some azure service- that takes as a parameter the storage key (in the ARM hitself) and passes it on? to make the process automatically. if so which service can it be? or can you point me out to some docs?
thank you
Azure Storage
2 answers
Sort by: Most helpful
-
-
deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
2021-08-26T20:44:24.627+00:00 @Rotem ben hemo
I don't recommend outputting your access keys via the arm template and storing that directly in your DB. Your storage account access keys are similar to a root password for your storage account. Always be careful to protect your access keys. Use Azure Key Vault to manage and rotate your keys securely. Avoid distributing access keys to other users, hard-coding them, or saving them anywhere in plain text that is accessible to others. Rotate your keys if you believe they may have been compromised.Microsoft recommends that you use Azure Key Vault to manage your access keys, and that you regularly rotate and regenerate your keys. Using Azure Key Vault makes it easy to rotate your keys without interruption to your applications. You can also manually rotate your keys.
For more information see Use Azure Key Vault to manage your access keys. Since you are using ARM template you also might find this article helpful. Quickstart: Set and retrieve a secret from Azure Key Vault using an ARM template
-------------------------------
Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.