This is a standalone web version of the ARM Template Viewer extension for VS Code. This web app displays a graphical preview of Azure Resource Manager (ARM) templates. Once a template is loaded, the view will show all resources with the official Azure icons and also linkage between the resources.
Not all features from the extension are supported, for the full experience please use the extension
The main repo for the extension is here: https://github.com/benc-uk/armview-vscode
The application is written in TypeScript and is a standard Node.js + Express web application.
This app is effectively a wrapper around the VS Code extension, as such it is structured a little strangely. Effort has been made to use the code from the VS Code extension without any modification, and it is pulled into this repo via a Git submodule and resides in the armview-vscode/
directory
Source for this app is held in src
and views
folders
When the app is built, it is TypeScript transpiled, along with the dependencies from armview-vscode
and output is placed in dist
directory
NOTE!
An important part of the build is copyStaticAssets.js
which takes static assets from both the src/public/
and armview-vscode/assets/
and copies them to dist. As follows
copy "src/public/*" -> "dist/public/"
copy "armview-vscode/assets/*" -> "dist/ext/"
npm install
npm run build
npm run serve
A Dockerfile
is provided. Either build locally with docker build
or pull from GitHub container registry:
docker run -p 3000:3000 ghcr.io/benc-uk/armview-web:latest
The following routes are supported:
GET /
Show the simple home/index pageGET /viewPortal
Integration page with fake form, for embedding in Azure portalGET /view?url=<template-url>
Render a template from the given URL (plain or URI encoded)GET /view/<template-url>
Render a template from the given URL, must be encodedPOST /view
HTTP POST raw template as text or JSONPOST /view
HTTP POST template asmultipart/form-data
file upload, file content field should be calledtemplateFile
POST /view
HTTP POST template as viaapplication/x-www-form-urlencoded
form, template content field should be namedtemplate