chapter two

2 Writing your first ARM template

 

This chapter covers

  • Writing your first ARM template
  • Using VS Code to write and validate templates
  • Deploying your template using the Azure Portal
  • Creating a visual representation of your template

With the theory covered, it is time to get hands-on and write your first ARM template. And while writing ARM templates may seem like a tough job at first, you get the hang of it soon enough. Experience shows that it takes most people one to two days of practice to get familiar with the syntax.

Getting started is easier when you are using the right tools for the job. As ARM templates are written as JSON documents, a powerful text editor is recommended. For ARM templates specifically, the recommendation is to use Visual Studio Code (VS Code). VS Code is not only a powerful text editor, but there is also an extension available that supports writing ARM templates. This chapter helps setting up VS Code and the extension.

2.1 Working with JSON files

2.1.1 Installing the ARM Templates Extension in VS Code

2.2 Writing an ARM Templates in VS Code

2.2.1 Adding a resource

2.2.2 Leveraging IntelliSense in VS Code

2.3 Deploying an ARM template

2.4 Monitoring template deployments

2.5 Finding examples

2.6 Visualizing templates

2.7 Summary