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-portal/quick-create-bicep.md
+34-45Lines changed: 34 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Create an Azure portal dashboard by using a Bicep file
3
3
description: Learn how to create an Azure portal dashboard by using a Bicep file.
4
4
ms.topic: quickstart
5
5
ms.custom: subject-bicepqs,
6
-
ms.date: 09/07/2022
6
+
ms.date: 09/15/2022
7
7
---
8
8
9
9
# Quickstart: Create a dashboard in the Azure portal by using a Bicep file
@@ -17,37 +17,6 @@ A dashboard in the Azure portal is a focused and organized view of your cloud re
17
17
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
18
18
-[Azure PowerShell](/powershell/azure/install-az-ps) or [Azure CLI](/cli/azure/install-azure-cli).
19
19
20
-
## Create a virtual machine
21
-
22
-
The dashboard you create in the next part of this quickstart requires an existing VM. Create a VM by following these steps.
23
-
24
-
1. In the Azure portal, select **Cloud Shell** from the global controls at the top of the page.
25
-
26
-
:::image type="content" source="media/quick-create-template/cloud-shell.png" alt-text="Screenshot showing the Cloud Shell option in the Azure portal.":::
27
-
28
-
1. In the **Cloud Shell** window, select **PowerShell**.
29
-
30
-
:::image type="content" source="media/quick-create-template/powershell.png" alt-text="Screenshot showing the PowerShell option in Cloud Shell.":::
31
-
32
-
1. Copy the following command and enter it at the command prompt to create a resource group.
1. Next, copy the following command and enter it at the command prompt to create a VM in your new resource group.
39
-
40
-
```powershell
41
-
New-AzVm `
42
-
-ResourceGroupName "SimpleWinVmResourceGroup" `
43
-
-Name "myVM1" `
44
-
-Location "East US"
45
-
```
46
-
47
-
1. Enter a username and password for the VM. This is a new user name and password; it's not, for example, the account you use to sign in to Azure. For more information, see [username requirements](../virtual-machines/windows/faq.yml#what-are-the-username-requirements-when-creating-a-vm-) and [password requirements](../virtual-machines/windows/faq.yml#what-are-the-password-requirements-when-creating-a-vm-).
48
-
49
-
After the VM has been created, move on to the next section.
50
-
51
20
## Review the Bicep file
52
21
53
22
The Bicep file used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/azure-portal-dashboard/). The Bicep file for this article is too long to show here. To view the Bicep file, see [main.bicep](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.portal/azure-portal-dashboard/main.bicep). The Bicep file defines one Azure resource, a dashboard that displays data about the VM you created:
@@ -56,25 +25,45 @@ The Bicep file used in this quickstart is from [Azure Quickstart Templates](http
56
25
57
26
## Deploy the Bicep file
58
27
59
-
This example uses the Azure portal to deploy the template. You can also use other methods to deploy ARM templates, such as [Azure PowerShell](../azure-resource-manager/templates/deploy-powershell.md), [Azure CLI](../azure-resource-manager/templates/deploy-cli.md), or [REST API](../azure-resource-manager/templates/deploy-rest.md).
60
-
61
-
1. Select the following image to sign in to Azure and open a template.
28
+
1. Save the Bicep file as **main.bicep** to your local computer.
29
+
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
az group create --name $resourceGroupName --location $location
42
+
az deployment group create --resource-group $resourceGroupName --template-uri $vmTemplateUri --parameters adminUsername=$adminUserName adminPassword=$adminPassword dnsLabelPrefix=$dnsLabelPrefix
43
+
az deployment group create --resource-group $resourceGroupName --template-file main.bicep --parameters virtualMachineName=$virtualMachineName virtualMachineResourceGroup=$resourceGroupName
44
+
```
62
45
63
-
[](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.portal%2Fazure-portal-dashboard%2Fazuredeploy.json)
46
+
# [PowerShell](#tab/PowerShell)
64
47
65
-
1. Select or enter the following values, then select **Review + create**.
:::image type="content" source="media/quick-create-template/create-dashboard-using-template-portal.png" alt-text="Screenshot of the dashboard template deployment screen in the Azure portal.":::
0 commit comments