Create and deploy ARM templates by using the IntelliJ IDEA
Learn how to deploy an Azure Resource Manager template (ARM template) to Azure using the IntelliJ IDEA, and the process of editing and update the template directly from the IDE. ARM templates are JSON files that define the resources you need to deploy for your solution. To understand the concepts associated with deploying and managing your Azure solutions, see the template deployment overview.
After completing the tutorial, you deploy an Azure Storage account. The same process can be used to deploy other Azure resources.
If you don't have an Azure subscription, create a free account before you begin.
To complete this article, you need:
- An IntelliJ IDEA Ultimate Edition or Community Edition installed
- The Azure Toolkit for IntelliJ installed, check IntelliJ's plugins management guide for more information
- Be signed in to your Azure account for the Azure Toolkit for IntelliJ
Deploy a Quickstart template
Instead of creating a template from scratch, you open a template from Azure Quickstart Templates. Azure Quickstart Templates is a repository for ARM templates. The template used in this article is called Create a standard storage account. It defines an Azure Storage account resource.
If your Azure Toolkit are properly installed and signed-in, you should see Azure Explorer in your IntelliJ IDEA's sidebar. Right-click on the Resource Management and select Create Deployment.
Config your Deployment Name, Subscription, Resource Group, and Region. Here we deploy the template into a new resource group
testRG. Then, select path for Resource Template as
azuredeploy.jsonand Resource Parameters as
After you click OK, the deployment is started. Until the deployment complete, you can find the progress from IntelliJ IDEA's status bar on the bottom.
Browse an existing deployment
After the deployment is done, you can see the new resource group
testRGand a new deployment created. Right-click on the deployment and you can see a list of possible actions. Now select Show Properties.
A tab view will be open to show some useful properties like deployment status and template structure.
Edit and update an existing deployment
Select Edit Deployment from right-click menu or the show properties view before. Another tab view will be open, showing the template and parameter files for the deployment on Azure. To save those files to local, you could click Export Template File or Export Parameter Files.
You can edit the two files on this page and deploy the changes to Azure. Here we modify the value of storageAccountType in parameter files, from
Standard_GRS. Then, click Update Deployment on the bottom and confirm the update.
After update deployment completed, you can verify on the portal that the created storage account is changed to
Clean up resources
When the Azure resources are no longer needed, clean up the resources you deployed by deleting the resource group. You can do it from Azure portal or Azure CLI. In Azure Explorer from IntelliJ IDEA, right click on your created resource group and select delete.
Notice that delete a deployment will not delete resources created by the deployment. Please delete corresponding resource group or specific resources if you no longer need them.
The main focus of this article is to use IntelliJ IDEA to deploy an existing template from Azure Quickstart templates. You also learned how to view and update an existing deployment on Azure. The templates from Azure Quickstart templates might not give you everything you need. To learn more about template development, see our new beginner tutorial series: