Skip to content

Commit 96277e2

Browse files
committed
[Azure portal] - add Bicep quickstart
1 parent c231dd7 commit 96277e2

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
title: Create an Azure portal dashboard by using a Bicep file
3+
description: Learn how to create an Azure portal dashboard by using a Bicep file.
4+
ms.topic: quickstart
5+
ms.custom: subject-bicepqs,
6+
ms.date: 09/07/2022
7+
---
8+
9+
# Quickstart: Create a dashboard in the Azure portal by using a Bicep file
10+
11+
A dashboard in the Azure portal is a focused and organized view of your cloud resources. This quickstart focuses on the process of deploying a Bicep file to create a dashboard. The dashboard shows the performance of a virtual machine (VM), as well as some static information and links.
12+
13+
[!INCLUDE [About Bicep](../../includes/resource-manager-quickstart-bicep-introduction.md)]
14+
15+
## Prerequisites
16+
17+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
18+
19+
## Create a virtual machine
20+
21+
The dashboard you create in the next part of this quickstart requires an existing VM. Create a VM by following these steps.
22+
23+
1. In the Azure portal, select **Cloud Shell** from the global controls at the top of the page.
24+
25+
:::image type="content" source="media/quick-create-template/cloud-shell.png" alt-text="Screenshot showing the Cloud Shell option in the Azure portal.":::
26+
27+
1. In the **Cloud Shell** window, select **PowerShell**.
28+
29+
:::image type="content" source="media/quick-create-template/powershell.png" alt-text="Screenshot showing the PowerShell option in Cloud Shell.":::
30+
31+
1. Copy the following command and enter it at the command prompt to create a resource group.
32+
33+
```powershell
34+
New-AzResourceGroup -Name SimpleWinVmResourceGroup -Location EastUS
35+
```
36+
37+
1. Next, copy the following command and enter it at the command prompt to create a VM in your new resource group.
38+
39+
```powershell
40+
New-AzVm `
41+
-ResourceGroupName "SimpleWinVmResourceGroup" `
42+
-Name "myVM1" `
43+
-Location "East US"
44+
```
45+
46+
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-).
47+
48+
After the VM has been created, move on to the next section.
49+
50+
## Review the Bicep file
51+
52+
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:
53+
54+
- [Microsoft.Portal/dashboards](/azure/templates/microsoft.portal/dashboards?pivots=deployment-language-bicep)
55+
56+
## Deploy the Bicep file
57+
58+
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).
59+
60+
1. Select the following image to sign in to Azure and open a template.
61+
62+
[![Deploy to Azure](../media/template-deployments/deploy-to-azure.svg)](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)
63+
64+
1. Select or enter the following values, then select **Review + create**.
65+
66+
:::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.":::
67+
68+
Unless it's specified, use the default values to create the dashboard.
69+
70+
- **Subscription**: select the Azure subscription.
71+
- **Resource group**: select **SimpleWinVmResourceGroup**.
72+
- **Location**: If not automatically selected, choose **East US**.
73+
- **Virtual Machine Name**: enter **myVM1**.
74+
- **Virtual Machine Resource Group**: enter **SimpleWinVmResourceGroup**.
75+
76+
1. Select **Create**. You'll see a notification confirming when the dashboard has been deployed successfully.
77+
78+
## Review deployed resources
79+
80+
[!INCLUDE [azure-portal-review-deployed-resources](../../includes/azure-portal-review-deployed-resources.md)]
81+
82+
## Clean up resources
83+
84+
If you want to remove the VM and associated dashboard, delete the resource group that contains them.
85+
86+
1. In the Azure portal, search for **SimpleWinVmResourceGroup**, then select it in the search results.
87+
88+
1. On the **SimpleWinVmResourceGroup** page, select **Delete resource group**, enter the resource group name to confirm, then select **Delete**.
89+
90+
> [!CAUTION]
91+
> Deleting a resource group will delete all of the resources contained within it. If the resource group contains additional resources aside from your virtual machine and dashboard, those resources will also be deleted.
92+
93+
## Next steps
94+
95+
For more information about dashboards in the Azure portal, see:
96+
97+
> [!div class="nextstepaction"]
98+
> [Create and share dashboards in the Azure portal](azure-portal-dashboards.md)

0 commit comments

Comments
 (0)