Step by Step ARM Templates - What is in an ARM Template - Understanding Components 5 - Outputs

@20aman    Aug 30, 2016

Index of all blogs in this Step by Step ARM Templates series is located here: Step by Step Azure Resource Manager (ARM) Templates - Index

If you haven't checked the previous blog on the overall structure of the ARM template, I suggest you give it a quick read before checking the component described in this post in detail.

  1. Understanding all components
  2. Parameters
  3. Variables
  4. Resources
  5. Outputs - This blog post

Outputs

This section is used to output any values after the deployment of the ARM Template. This can output any Ids or connection strings based on the deployed resources.

This is a single JSON object with various output objects (just like Parameters. The overall JSON structure looks like below:

"outputs": { 
    "output1" : {
                     "type":"string",
                     "value": "value1"
      },
    "output2" : {
                     "type":"string",
                     "value": "value2"
      },
}

Each output object has 2 properties:

  1. Type - Data type of the output
  2. Value - value of the output

A real life example with look like below:

"outputs": {
    "adminUsername": {
        "type": "string",
        "value": "[parameters('adminUsername')]"
    }
}

The above example will output the administrator Username using the parameter from the template.

That's all there is to Outputs in ARM Templates. If you have any doubts, please comment in the below section. Use the links at the Top to know all about other components in an ARM Template.





Comments powered by Disqus