ARM template extension with Visual Studio Code.
It is now possible to add the Azure Resource Manager (ARM) template extension to the VS code so we can directly edit and create template with VS code.
To add the extension in VS code, search Azure Resource Manager Tools or ARM tools and click on Install.
In the above image, there will be install button. As I have already installed extension, it shows uninstall button.
Once the extension is installed, VS code is ready for ARM template creation. Create a new file with .json extension as we know that the ARM template is in the form of JSON structure.
In the new file, type arm! and select the first keyword. It will create a structure for ARM template.
You can also check in the status bar of the VS studio that the file type has been changed to “Azure Resource Manager Template“
Not only this, but VS code also creates structure and provide suggestions for each possible items like parameters, variables, functions, resources, outputs etc so it makes easier for template creation. For example, to check the structure for the parameters use ctrl+space inside the parameters brackets
Click on New-Parameter popup box.
If you need more than one parameter then use comma (,) and again use ctrl+space button for the popup box.
You can check the Auto suggestions for the other values as well. For example, type contains datatypes. Lets check the possible datatypes.
Inside type value use ctrl+space button.
Example of the Parameters in ARM template.
Similarly, we can use for others. Below example is for the resources.