DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Tools
  4. Authoring ARM Templates in Visual Studio Code

Authoring ARM Templates in Visual Studio Code

Writing ARM templates for Azure? The tooling isn't very impressive. Fortunately, Visual Studio Code and assorted other tools add needed functionality.

Sam Cogan user avatar by
Sam Cogan
CORE ·
Mar. 13, 17 · Opinion
Like (2)
Save
Tweet
Share
4.41K Views

Join the DZone community and get the full member experience.

Join For Free

if you're writing arm templates for azure, you'll likely have found that the amount of tooling available for authoring templates is fairly limited. the default solution seems to be visual studio, but this can be very heavy and resource intensive without gaining any of the real benefits of vs, such as debugging. i've recently switched over from using visual studio to use visual studio code, for a much more lightweight experience. while there still could be significant improvements to the tooling available for authoring arm resources, i've found it to be a fairly enjoyable experience.

for those that don't know, vs code is a lightweight, multi-platform, open-source editor based on the electron framework. vs code supports syntax highlighting, code completion, snippets, etc., but one of its big benefits is its extension architecture. due to the open nature of the platform, it has lead to a big repository of extensions, and in particular, there are some great extensions for authoring azure deployment recipes. given that, here's what i've got running in my editor at the moment. hopefully, if you're new to vs code, this might help you get going, and if you're already using it, i'd love to hear any suggestions!

git

vs code supports git out of the box and provides controls for committing code right in the editor, but you do need to actually install git for windows , or the appropriate version for your platform, on the machine for it to work.

azure resource manager tools

the most important plugin for arm template development, this adds language support for arm templates to give you intellisense, syntax highlighting, in-line help, and many other language functions.

arm snippets

produced by art of shell, this is a set of pre-defined snippets for arm templates. it's not a huge selection, but there are some very useful ones for parameters, storage, and networks, and you can always add your own on top. to activate the snippets, make sure that you're in a json file. then, either start typing arm, or press ctrl-shift-p to bring up the command palette, then go to insert snippet. obviously, you can build on these and add your own snippets too.

azure tools for vs code

it includes a set of utilities to undertake actions in azure directly from vs code, such as:

  • create a web app
  • creating a batch account
  • creating a function
  • deploying an arm template
  • export a resource group to a template
  • get a storage account connection string
  • list azure subscriptions

the ability to deploy your templates and to export a resource group are particularly useful.

powershell

chances are that if you're writing arm templates, you're also writing or using powershell — either in scripts as part of your deployment, or with powershell dsc to configure your vms once deployed. this plugin adds language support for powershell (including dsc) so that you can get intellisense, code completion, etc.

code runner

this handy plugin lets you execute code from inside vs code. it supports many languages, but i've found it most beneficial for running powershell.

settings sync

it's pretty annoying to get your editor all setup how you want, then have to do it all again on another machine. settings sync lets you sync your settings, snippets, and extensions across multiple machines.

themes

there are a huge number of themes to change the visual aspects of your editor, and which one you go with is really going to come down to personal preference. i'm currently running:

  • vscode-icons to add icons to my explorer window.
  • the one dark theme.

but who knows what i might change to tomorrow...

Visual Studio Code Template Arm (geography)

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

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Load Balancing Pattern
  • Top 5 Node.js REST API Frameworks
  • Iptables Basic Commands for Novice
  • OpenID Connect Flows

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: