Authoring Azure JSON Templates Tooling, best practices, and inspiration for building Azure Resource Manager templates. Trevor Sullivan trevor@artofshell.com Art of Shell LLC Vlad Joanovic Principal Program Manager Microsoft
Trevor Sullivan Vlad Joanovic @pcgeek86 @vladimirjoanovi Microsoft MVP, Docker Captain Principal Program Manager Lead 12 years in IT 17 years in IT Beer Seafood
Workflow
ARM Template Workflow Author Validate Test Deploy Monitor
Template Validation Compiles template Ensures valid syntax xPlat CLI: azure group template validate PowerShell: Test-AzureRmResourceGroupDeployment
Tooling
Visual Studio Code Azure Resource Manager (ARM) Extension Easily install from marketplace Custom themes Syntax highlighting Collapsible code regions
Visual Studio Code
Visual Studio Azure SDK 2.x Graphical view of template
ARM Visualizer
ARM Visualizer
Azure Lens
Export ARM Templates
Set up Visual Studio Code During this demonstration, we'll show: Install Visual Studio Code Install VS Code ARM Extension Install armsnippet extension (JSON + PowerShell snippets)
Template Structure
ARM JSON Template Structure { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { }, "variables": { "resources": [ ], "outputs": { }
Template Functions
CopyIndex() Useful for building large numbers of resources
String Manipulation Concatenation Trimming Padding
References
Best Practices
And Then …
Section Header This is the next section
Title Line1 Line2 Line3 Line4 Line5 Line6 Bullet Level 1
Title Code
Text Only with Border Level 1 Level 2 Level 3
Text Only without Border Level 1 Level 2 Level 3
Title Text 1 Level 1 Level 2 Level 3 Text 2 Level 1 Level 2 Level 3
Title Text Text Section 1 Section 2 Level 1 Level 1 Level 2 Level 2
Demo Title