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!
Join the DZone community and get the full member experience.
Join For Free
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 th
e 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:
- browse to the snippets file on github .
- copy the contents of the file to your clipboard.
- launch visual studio code.
-
navigate to file > preferences > user snippets > json.
append (paste) the contents of the github file into your user snippets file before the final "}". - 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!
Published at DZone with permission of Sam Cogan, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments