How to create secret using dynamic ID with ARM template

sns 9,231 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.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,630 questions
0 comments No comments
{count} votes

Accepted answer
  1. Marilee Turscak-MSFT 36,411 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