How to create secret using dynamic ID with ARM template

sns 8,296 Reputation points
2022-08-22T04:54:13.597+00:00

How to create secret using dynamic ID with ARM template not with regular key vault.

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
13,657 questions
No comments
{count} votes

Accepted answer
  1. Marilee Turscak-MSFT 22,311 Reputation points Microsoft Employee
    2022-08-22T22:15:40.623+00:00

    Hi @sns ,

    I assume by "not with regular key vault" you mean not in the Azure portal in the vault itself, but please correct me if I'm wrong.

    We have a guide that shows how to use an ARM template to create and set the secret using dynamic ID. https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/key-vault-parameter?tabs=azure-cli#reference-secrets-with-dynamic-id

    You would use the following:

    az group create --name ExampleGroup --location centralus  
    az keyvault create \  
      --name ExampleVault \  
      --resource-group ExampleGroup \  
      --location centralus \  
      --enabled-for-template-deployment true  
    az keyvault secret set --vault-name ExampleVault --name "ExamplePassword" --value "hVFkk965BuUv"  
    

    Then you would reference them with the dynamic ID.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful