Azure ARM templates – Example use of Outputs

The Outputs part of an ARM template allow data to be retrieved as part of that templates creation.

Given a simple example of creating an vNet, here’s what we get.
Defining 3 outputs of differing types,
– Virtual Network [Object]
– Virtual Network Addresses [Array]
– Virtual Network Address Prefix [String] (first string in the array)

We get this output.

Powershell script for deploying and retrieving values.

Taking a more practical example, retrieving the StaticIP’s from APIM after creation;


Powershell Output

One Reply to “Azure ARM templates – Example use of Outputs”

  1. Great article and explanation of how to get objects, can an entire object be returned from a copyindex() loop?

    The purpose would be post deployment configuration in PowerShell for setting static IP or vNet DNS

Leave a Reply

Your email address will not be published. Required fields are marked *