Search code examples
azureazure-resource-managerazure-keyvaultazure-cliazureportal

Deploy azure keyvault with ARM template


When I create a keyvault with azure portal, before actual creating I have a link called "View Automation Template": enter image description here

Where inside I can see a keyvault ARM template, but as I can see the azure cli command az keyvault create .. doesn't support options like --template-file or --parameters. How can I deploy the ARM template from the portal via azure CLI?


Solution

  • The CLI command you are looking for is az deployment group create which makes use of an ARM template and parameters to deploy that template in a resource group.

    You would use az keyvault create when you want to create a KeyVault resource by directly specifying its properties as command parameters instead of using an ARM template and parameters.