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
Write-Host "After all the resources are provisioned, go to https://devportal.microsoft.com/ to create a Dev Box. You can also refer to this guide: [Quickstart: Create a dev box - Microsoft Dev Box | Microsoft Learn](https://learn.microsoft.com/azure/dev-box/quickstart-create-dev-box)."
80
-
Write-Host "Press [ENTER] to continue."
71
+
$userPrincipalName = Read-Host "Please enter user principal name e.g. [email protected]"
72
+
$resourceGroupName = Read-Host "Please enter resource group name e.g. rg-devbox-dev"
73
+
$location = Read-Host "Please enter region name e.g. eastus"
az group create -l $location -n $resourceGroupName
79
+
az group deployment create -g $resourceGroupName --template-uri $templateUri --parameters userPrincipalId=$userPrincipalId
80
+
}else {
81
+
Write-Host "User Principal Name cannot be found."
82
+
}
83
+
84
+
Write-Host "Provisioning Completed."
85
+
81
86
```
82
87
83
88
Wait until you see the prompt from the console.
@@ -86,25 +91,17 @@ For example, you can use a template to [add other customized images for Base, Ja
86
91
3. Right-click the shell console pane and then select **Paste**.
87
92
4. Enter the values.
88
93
89
-
It takes about 10 minutes to deploy the template. When completed, the output is similar to:
90
-
91
-
:::image type="content" source="media/quickstart-configure-dev-box-arm-template/dev-box-template-output.png" alt-text="Screenshot showing the output of the template.":::
94
+
It takes about 30 minutes to deploy the template.
92
95
93
96
Azure PowerShell is used to deploy the template. You can also use the Azure portal and Azure CLI. To learn other deployment methods, see [Deploy templates](../azure-resource-manager/templates/deploy-portal.md).
94
97
95
-
#### Depending on your configuration, you might want to change the following parameters:
96
-
97
-
-*Resource group name:* The default resource group name is “rg-devbox-test”; you can change it by editing `$resourceGroupName = "rg-devbox-test` in the template.
98
+
#### When deploying this template, you're prompted to provide the following parameters:
98
99
99
-
-*Subnet:* If you have an existing subnet, you can use the parameter `-existingSubnetId` to pass the existing subnet ID. The template doesn't create a new Virtual network and subnet if you specify an existing one.
100
+
-*User Principal Id*: The user principal ID of the user or group that will be granted the *Devcenter Dev Box User* role.
101
+
-*User Principal Type*: The type of user principal. Valid values are *User* or *Group*.
102
+
-*Location*: The location where the resources will be deployed. Choose a location close to the users who will be using the dev boxes to reduce latency.
100
103
101
-
-*Dev Box User role:* To grant the role [*DevCenter Dev Box User*](how-to-dev-box-user.md) to your user at Dev box project level, pass the principal ID to the `-principalId` parameter.
102
-
-**User:** You can find the principal ID listed as the object ID on the user Overview page.
103
-
:::image type="content" source="media/quickstart-configure-dev-box-arm-template/user-object-id.png" alt-text="Screenshot showing the user overview page with object ID highlighted.":::
104
-
-**Group:** You can find the principal ID listed as the object ID on the group Overview page.
105
-
:::image type="content" source="media/quickstart-configure-dev-box-arm-template/group-object-id.png" alt-text="Screenshot showing the group overview page with object ID highlighted.":::
106
-
107
-
Alternatively, you can provide access to a dev box project in the Azure portal, see [Provide user-level access to projects for developers](how-to-dev-box-user.md)
104
+
Alternatively, you can provide access to a dev box project in the Azure portal, see [Provide user-level access to projects for developers](how-to-dev-box-user.md).
108
105
109
106
## Review deployed resources
110
107
@@ -113,8 +110,6 @@ Alternatively, you can provide access to a dev box project in the Azure portal,
113
110
3. Select the resource group that you created in the previous section.
114
111
115
112
:::image type="content" source="media/quickstart-configure-dev-box-arm-template/dev-box-template-resources.png" alt-text="Screenshot showing the newly created dev box resource group and the resources it contains in the Azure portal.":::
116
-
117
-
1. Select the Dev Center. Its default name is dc-*resource-token*.
0 commit comments