Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

ARM Snippets for VS Code

DZone's Guide to

ARM Snippets for VS Code

Check out this repo for cross-platform tooling samples that you can use for Azure. Browse around, make your own, then commit them back to the community!

· Cloud Zone
Free Resource

Site24x7 - Full stack It Infrastructure Monitoring from the cloud. Sign up for free trial.

In my previous post on using VS Code for authoring ARM templates, I recommended using ARM Snippets from the plugin gallery. However, since then, I have come to realize this plugin is fairly limited in thARM Snippets for VS Codee number of snippets — and difficult to extend. Given this, I would now recommend utilizing the set of snippets provided by Azure Cross-Platform Tooling Samples.

These snippets don't have a nice VS Code Gallery plugin to install them, but they are much more extensive and, most importantly, it is easy to add your own and also commit these back to the repository to share with the community.

Installing Snippets

As there isn't a nice gallery installer, you do need to install these manually. Still, it's a pretty straightforward process:

  1. Browse to the snippets file on GitHub.
  2. Copy the contents of the file to your clipboard.
  3. Launch Visual Studio Code.
  4. Navigate to File > Preferences > User Snippets > JSON.
    Append (paste) the contents of the Github file into your user snippets file before the final "}".
  5. Save and close the user snippets file.

Once you have the snippets installed, open up or create a .json file and type "arm". VS Code should then present you with an auto-complete menu with all the snippets listed.

Select the snippet you want and it will appear in your editor. Edit the fields that require it and your good to go.

If you do end up adding your own snippets to this, don't forget to commit them back to share with the rest of us!


Site24x7 - Full stack It Infrastructure Monitoring from the cloud. Sign up for free trial.

Topics:
microsoft azure ,cloud ,tutorial ,visual studio code ,arm templates

Published at DZone with permission of Sam Cogan, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}