You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/template-tutorial-add-outputs.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,33 +2,33 @@
2
2
title: Tutorial - add outputs to template
3
3
description: Add outputs to your Azure Resource Manager template (ARM template) to simplify the syntax.
4
4
author: mumian
5
-
ms.date: 03/27/2020
5
+
ms.date: 08/17/2022
6
6
ms.topic: tutorial
7
7
ms.author: jgao
8
8
ms.custom:
9
9
---
10
10
11
11
# Tutorial: Add outputs to your ARM template
12
12
13
-
In this tutorial, you learn how to return a value from your Azure Resource Manager template (ARM template). You use outputs when you need a value from a deployed resource. This tutorial takes **7 minutes** to complete.
13
+
In this tutorial, you learn how to return a value from your Azure Resource Manager template (ARM template). You use outputs when you need a value for a resource you deploy. This tutorial takes **7 minutes** to complete.
14
14
15
15
## Prerequisites
16
16
17
17
We recommend that you complete the [tutorial about variables](template-tutorial-add-variables.md), but it's not required.
18
18
19
-
You must have Visual Studio Code with the Resource Manager Tools extension, and either Azure PowerShell or Azure CLI. For more information, see [template tools](template-tutorial-create-first-template.md#get-tools).
19
+
You need to have Visual Studio Code with the Resource Manager Tools extension, and either Azure PowerShell or Azure Command-Line Interface (CLI). For more information, see [template tools](template-tutorial-create-first-template.md#get-tools).
20
20
21
21
## Review template
22
22
23
23
At the end of the previous tutorial, your template had the following JSON:
It deploys a storage account, but it doesn't return any information about the storage account. You might need to capture properties from a new resource so they're available later for reference.
27
+
It deploys a storage account, but it doesn't return any information about it. You might need to capture properties from your new resource so they're available later for reference.
28
28
29
29
## Add outputs
30
30
31
-
You can use outputs to return values from the template. For example, it might be helpful to get the endpoints for your new storage account.
31
+
You can use outputs to return values from the template. It might be helpful, for example, to get the endpoints for your new storage account.
32
32
33
33
The following example highlights the change to your template to add an output value. Copy the whole file and replace your template with its contents.
34
34
@@ -38,7 +38,7 @@ There are some important items to note about the output value you added.
38
38
39
39
The type of returned value is set to `object`, which means it returns a JSON object.
40
40
41
-
It uses the [reference](template-functions-resource.md#reference) function to get the runtime state of the storage account. To get the runtime state of a resource, you pass in the name or ID of a resource. In this case, you use the same variable you used to create the name of the storage account.
41
+
It uses the [reference](template-functions-resource.md#reference) function to get the runtime state of the storage account. To get the runtime state of a resource, pass the name or ID of a resource. In this case, you use the same variable you used to create the name of the storage account.
42
42
43
43
Finally, it returns the `primaryEndpoints` property from the storage account.
44
44
@@ -61,7 +61,7 @@ New-AzResourceGroupDeployment `
61
61
62
62
# [Azure CLI](#tab/azure-cli)
63
63
64
-
To run this deployment command, you must have the [latest version](/cli/azure/install-azure-cli) of Azure CLI.
64
+
To run this deployment command, you need to have the [latest version](/cli/azure/install-azure-cli) of Azure CLI.
65
65
66
66
```azurecli
67
67
az deployment group create \
@@ -73,7 +73,7 @@ az deployment group create \
73
73
74
74
---
75
75
76
-
In the output for the deployment command, you'll see an object similar to the following example only if the output is in JSON format:
76
+
In the output for the deployment command, you see an object similar to the following example only if the output is in JSON format:
77
77
78
78
```json
79
79
{
@@ -87,11 +87,11 @@ In the output for the deployment command, you'll see an object similar to the fo
87
87
```
88
88
89
89
> [!NOTE]
90
-
> If the deployment failed, use the `verbose` switch to get information about the resources being created. Use the `debug` switch to get more information for debugging.
90
+
> If the deployment fails, use the `verbose` switch to get information about the resources being created. Use the `debug` switch to get more information for debugging.
91
91
92
92
## Review your work
93
93
94
-
You've done a lot in the last six tutorials. Let's take a moment to review what you have done. You created a template with parameters that are easy to provide. The template is reusable in different environments because it allows for customization and dynamically creates needed values. It also returns information about the storage account that you could use in your script.
94
+
You've done a lot in the last six tutorials. Let's take a moment to review what you've done. You created a template with parameters that are easy to provide. The template is reusable in different environments because it allows for customization and dynamically creates needed values. It also returns information about the storage account that you could use in your script.
95
95
96
96
Now, let's look at the resource group and deployment history.
97
97
@@ -123,16 +123,16 @@ Now, let's look at the resource group and deployment history.
123
123
124
124
If you're moving on to the next tutorial, you don't need to delete the resource group.
125
125
126
-
If you're stopping now, you might want to clean up the resources you deployed by deleting the resource group.
126
+
If you're stopping now, you might want to delete the resource group.
127
127
128
-
1. From the Azure portal, select **Resource group** from the left menu.
129
-
2.Enter the resource group name in the **Filter by name** field.
130
-
3.Select the resource group name.
128
+
1. From the Azure portal, select **Resource groups** from the left menu.
129
+
2.Type the resource group name in the **Filter for any field...** text field.
130
+
3.Check the box next to **myResourceGroup** and select **myResourceGroup** or your resource group name.
131
131
4. Select **Delete resource group** from the top menu.
132
132
133
133
## Next steps
134
134
135
-
In this tutorial, you added a return value to the template. In the next tutorial, you'll learn how to export a template and use parts of that exported template in your template.
135
+
In this tutorial, you added a return value to the template. In the next tutorial, you learn how to export a template and use parts of that exported template in your template.
0 commit comments