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
# Tutorial: Create Azure portal forms for a template spec
@@ -24,9 +24,9 @@ For Azure PowerShell, use [version 6.0.0 or later](/powershell/azure/install-azu
24
24
25
25
## Create template
26
26
27
-
To show the different portal elements that are available in a form, you'll use an ARM template with several parameters. The following template creates a key vault, configures permissions to key vault for a user, and adds a secret.
27
+
To show the different portal elements that are available in a form, use an ARM template with several parameters. The following template creates a key vault, configures permissions to key vault for a user, and adds a secret.
28
28
29
-
Copy this file and save it locally. This tutorial assumes you've named it **keyvault.json** but you can give it any name.
29
+
Copy this file and save it locally. This tutorial assumes you named it **keyvault.json** but you can give it any name.
30
30
31
31
```json
32
32
{
@@ -182,15 +182,15 @@ Copy this file and save it locally. This tutorial assumes you've named it **keyv
182
182
183
183
## Create default form
184
184
185
-
The Azure portal provides a sandbox for creating and previewing forms. This sandbox can render a form from an existing ARM template. You'll use this default form to get started with creating a form for your template spec. For more information about the form structure, see [FormViewType](https://github.com/Azure/portaldocs/blob/main/portal-sdk/generated/dx-view-formViewType.md).
185
+
The Azure portal provides a sandbox for creating and previewing forms. This sandbox can render a form from an existing ARM template. Use this default form to get started with creating a form for your template spec. For more information about the form structure, see [FormViewType](https://github.com/Azure/portaldocs/blob/main/portal-sdk/generated/dx-view-formViewType.md).
186
186
187
-
1. Open the [Form view sandbox](https://aka.ms/form/sandbox).
187
+
1. Open the [Form view sandbox](https://also known as.ms/form/sandbox).
188
188
189
189
:::image type="content" source="./media/template-specs-create-portal-forms/deploy-template-spec-config.png" alt-text="Screenshot of Azure portal form view sandbox interface.":::
190
190
191
-
1. In **Package Type**, select **CustomTemplate**. Make sure you select the package type before specify deployment template.
192
-
1. In **Deployment template (optional)**, select the key vault template you saved locally. When prompted if you want to overwrite current changes, select **Yes**. The autogenerated form is displayed in the code window. The form is editable from the portal. To customize the form, see [customize form](#customize-form).
193
-
If you look closely into the autogenerated form, the default title is called **Test Form View**, and there's only one step called **basics** defined.
191
+
1. In **Package Type**, select **CustomTemplate**. Make sure you select the package type before specifying deployment template.
192
+
1. In **Deployment template (optional)**, select the key vault template you saved locally. When prompted if you want to overwrite current changes, select **Yes**. The autogenerated form is displayed in the code window. You can edit the form from the portal. To customize the form, see [customize form](#customize-form).
193
+
If you look closely at the autogenerated form, the default title is **Test Form View**. There's only one step called **basics** defined.
194
194
195
195
```json
196
196
{
@@ -216,43 +216,43 @@ The Azure portal provides a sandbox for creating and previewing forms. This sand
216
216
}
217
217
```
218
218
219
-
1. To see that works it without any modifications, select **Preview**.
219
+
1. To see that it works without any modifications, select **Preview**.
220
220
221
221
:::image type="content" source="./media/template-specs-create-portal-forms/view-portal-basic.png" alt-text="Screenshot of the generated basic Azure portal form.":::
222
222
223
-
The sandbox displays the form. It has fields for selecting a subscription, resource group, and region. It also fields for all of the parameters from the template.
223
+
The sandbox displays the form. It has fields for selecting a subscription, resource group, and region. It also has fields for all of the parameters from the template.
224
224
225
-
Most of the fields are text boxes, but some fields are specific for the type of parameter. When your template includes allowed values for a parameter, the autogenerated form uses a drop-down element. The drop-down element is pre-populated with the allowed values.
225
+
Most of the fields are text boxes, but some fields are specific for the type of parameter. When your template includes allowed values for a parameter, the autogenerated form uses a drop-down element. The drop-down element is prepopulated with the allowed values.
226
226
227
-
In between the title and **Project details**, there are no tabs because the default form only has one step defined. In the **Customize form** section, you'll break the parameters into multiple tabs.
227
+
Between the title and **Project details**, there are no tabs because the default form only has one step defined. In the **Customize form** section, you break the parameters into multiple tabs.
228
228
229
229
> [!WARNING]
230
-
> Don't select **Create** as it will launch a real deployment. You'll have a chance to deploy the template spec later in this tutorial.
230
+
> Don't select **Create** as it launches a real deployment. You have a chance to deploy the template spec later in this tutorial.
231
231
232
232
1. To exit from the preview, select **Cancel**.
233
233
234
234
## Customize form
235
235
236
-
The default form is a good starting point for understanding forms but usually you'll want to customize it. You can edit it in the sandbox or in Visual Studio Code. The preview option is only available in the sandbox.
236
+
The default form is a good starting point for understanding forms but usually you want to customize it. You can edit it in the sandbox or in Visual Studio Code. The preview option is only available in the sandbox.
237
237
238
238
1. Give the form a **title** that describes its use.
1. Your default form had all of the fields for your template combined into one step called **Basics**. To help users to understand the values they're providing, divide the form into steps. Each step contains fields related to a logical part of the solution to deploy.
242
+
1. Your default form had all of the fields for your template combined into one step called **Basics**. To help users understand the values they're providing, divide the form into steps. Each step contains fields related to a logical part of the solution to deploy.
243
243
244
-
Find the step labeled **Basics**. You'll keep this step but add steps below it. The new steps will focus on configuring the key vault, setting user permissions, and specifying the secret. Make sure you add a comma after the basics step.
244
+
Find the step labeled **Basics**. Keep this step but add steps that focus on configuring the key vault, setting user permissions, and specifying the secret. Add a comma after the basics step.
> Properties in the form are case-sensitive. Make sure you use the casing shown in the examples.
250
250
251
-
1. Select **Preview**. You'll see the steps, but most of them don't have any elements.
251
+
1. Select **Preview**. You see the steps, but most of them don't have any elements.
252
252
253
253
:::image type="content" source="./media/template-specs-create-portal-forms/view-steps.png" alt-text="Screenshot of Azure portal form with multiple steps.":::
254
254
255
-
1. Now, move elements to the appropriate steps. Start with the elements labeled **Secret Name** and **Secret Value**. Remove these elements from the **Basics** step and add them to the **Secret** step.
255
+
1. Move elements to the appropriate steps. Start with the elements labeled **Secret Name** and **Secret Value**. Remove these elements from the **Basics** step and add them to the **Secret** step.
256
256
257
257
```json
258
258
{
@@ -294,7 +294,7 @@ The default form is a good starting point for understanding forms but usually yo
294
294
}
295
295
```
296
296
297
-
1. When you move elements, you need to fix the `outputs` section. Currently, the outputs section references those elements as if they were still in the basics step. Fix the syntax so it references the elements in the `secret` step.
297
+
1. When you move elements, fix the `outputs` section. Currently, the outputs section references those elements as if they were still in the basics step. Fix the syntax so it references the elements in the `secret` step.
298
298
299
299
```json
300
300
"outputs": {
@@ -305,7 +305,7 @@ The default form is a good starting point for understanding forms but usually yo
305
305
}
306
306
```
307
307
308
-
1. Continue moving elements to the appropriate steps. Rather than go through each one, take a look at the updated form.
308
+
1. Continue moving elements to the appropriate steps. Rather than go through each one, look at the updated form.
@@ -345,19 +345,19 @@ To test the form, go to the portal and navigate to your template spec. Select **
345
345
346
346
:::image type="content" source="./media/template-specs-create-portal-forms/deploy-template-spec.png" alt-text="Screenshot of Azure template spec overview with deploy option highlighted.":::
347
347
348
-
You'll see the form you created. Go through the steps and provide values for the fields.
348
+
You see the form you created. Go through the steps and provide values for the fields.
349
349
350
-
On the **Basics** step, you'll see a field for **Region**. This field is used for the location of the resource group. On the **Key Vault** step, you'll see a field for **Location**. This field is used for the location of the key vault.
350
+
On the **Basics** step, you see a field for **Region**. This field is for the location of the resource group. On the **Key Vault** step, you see a field for **Location**. This field is for the location of the key vault.
351
351
352
-
On the **Permissions** step, you can provide your own user ID for the object ID. Use the default value (`["list"]`) for key and secret permissions. You'll improve that option in the next section.
352
+
On the **Permissions** step, provide your user ID for the object ID. Use the default value (`["list"]`) for key and secret permissions. You improve that option in the next section.
353
353
354
-
When you have finished providing values, select **Create** to deploy the template spec.
354
+
When you finish providing values, select **Create** to deploy the template spec.
355
355
356
356
## Improve the form
357
357
358
-
In the previous section, you added steps and moved elements, but you didn't change any of the default behaviors. In this section, you'll make changes that improve the experience for users of your template spec.
358
+
In the previous section, you added steps and moved elements, but you didn't change any of the default behaviors. In this section, you make changes that improve the experience for users of your template spec.
359
359
360
-
Previously, the two permissions fields were text boxes. Now, you'll use a drop-down. Set the type to `Microsoft.Common.DropDown`.
360
+
Previously, the two permissions fields were text boxes. Now, you use a drop-down. Set the type to `Microsoft.Common.DropDown`.
These fields need to pass an array to the template. A regular drop-down won't work because it only lets you select one value. To select more than one value and pass them as an array, add the `multiselect` field and set to `true`.
370
+
These fields need to pass an array to the template. A regular drop-down doesn't work because it only lets you select one value. To select more than one value and pass them as an array, add the `multiselect` field and set it to `true`.
@@ -407,7 +407,7 @@ Redeploy your template spec with the improved portal form.
407
407
408
408
:::image type="content" source="./media/template-specs-create-portal-forms/view-portal.png" alt-text="Screenshot of Azure portal form for providing values to a template spec.":::
409
409
410
-
Notice that your permission fields are now drop-down that allow multiple values.
410
+
Notice that your permission fields are now drop-downs that allow multiple values.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/templates/template-tutorial-create-multiple-instances.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Create multiple resource instances
3
3
description: Learn how to create an Azure Resource Manager template (ARM template) to create multiple Azure resource instances.
4
-
ms.date: 06/20/2024
4
+
ms.date: 01/30/2025
5
5
ms.topic: tutorial
6
6
ms.custom: devx-track-arm-template
7
7
---
@@ -21,13 +21,13 @@ This tutorial covers the following tasks:
21
21
22
22
If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/free/) before you begin.
23
23
24
-
For a Learn module that covers resource copy, see [Manage complex cloud deployments by using advanced ARM template features](/training/modules/manage-deployments-advanced-arm-template-features/).
24
+
For a Microsoft Learn module that covers resource copy, see [Manage complex cloud deployments by using advanced ARM template features](/training/modules/manage-deployments-advanced-arm-template-features/).
25
25
26
26
## Prerequisites
27
27
28
28
To complete this article, you need:
29
29
30
-
* Visual Studio Code with Resource Manager Tools extension. See[Quickstart: Create ARM templates with Visual Studio Code](quickstart-create-templates-use-visual-studio-code.md).
30
+
* Visual Studio Code with Resource Manager Tools extension. For more information, see[Quickstart: Create ARM templates with Visual Studio Code](quickstart-create-templates-use-visual-studio-code.md).
31
31
32
32
## Open a Quickstart template
33
33
@@ -42,7 +42,7 @@ To complete this article, you need:
42
42
43
43
1. Select **Open** to open the file.
44
44
1. There's a `Microsoft.Storage/storageAccounts` resource defined in the template. Compare the template to the [template reference](/azure/templates/Microsoft.Storage/storageAccounts). It's helpful to get some basic understanding of the template before customizing it.
45
-
1. Select **File** > **Save As** to save the file as _azuredeploy.json_ to your local computer.
45
+
1. To save the file, select **File** > **Save As**. Save the file as _azuredeploy.json_ to your local computer.
46
46
47
47
## Edit the template
48
48
@@ -52,7 +52,7 @@ From Visual Studio Code, make the following four changes:
52
52
53
53
:::image type="content"source="./media/template-tutorial-create-multiple-instances/resource-manager-template-create-multiple-instances.png"alt-text="Screenshot of Visual Studio Code with Azure Resource Manager creating multiple instances.":::
54
54
55
-
1. Add a `copy` element to the storage account resource definition. In the `copy` element, you specify the number of iterations and a variable for this loop. The count value must be a positive integer and can't exceed 800.
55
+
1. Add a `copy` element to the storage account resource definition. In the `copy` element, specify the number of iterations and a variable for this loop. The count value must be a positive integer and can't exceed 800.
56
56
57
57
```json
58
58
"copy": {
@@ -61,13 +61,12 @@ From Visual Studio Code, make the following four changes:
61
61
},
62
62
```
63
63
64
-
1. The `copyIndex()` function returns the current iteration in the loop. You use the index as the name prefix. `copyIndex()` is zero-based. To offset the index value, you can pass a value in the `copyIndex()` function. For example, `copyIndex(1)`.
64
+
1. The `copyIndex()` function returns the current iteration in the loop. Use the index as the name prefix. `copyIndex()` is zero-based. To offset the index value, you can pass a value in the `copyIndex()` function. For example, `copyIndex(1)`.
0 commit comments