Skip to content

Commit 427112a

Browse files
Merge pull request #196673 from schaffererin/0429-internal-load-quickstart
Creating new Bicep quickstart - Internal Load Balancer
2 parents de8eadf + 3cb2e9e commit 427112a

File tree

3 files changed

+111
-1
lines changed

3 files changed

+111
-1
lines changed

articles/azure-resource-manager/bicep/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107
href: ../../expressroute/quickstart-create-expressroute-vnet-bicep.md?toc=/azure/azure-resource-manager/bicep/toc.json
108108
- name: Front Door
109109
href: ../../frontdoor/quickstart-create-front-door-bicep.md?toc=/azure/azure-resource-manager/bicep/toc.json
110+
- name: Load Balancer - internal
111+
href: ../../load-balancer/quickstart-load-balancer-standard-internal-bicep.md?toc=/azure/azure-resource-manager/bicep/toc.json
110112
- name: NAT gateway
111113
href: ../../virtual-network/nat-gateway/quickstart-create-nat-gateway-bicep.md?toc=/azure/azure-resource-manager/bicep/toc.json
112114
- name: Private Link service

articles/load-balancer/TOC.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
href: quickstart-load-balancer-standard-internal-powershell.md
2727
- name: CLI
2828
href: quickstart-load-balancer-standard-internal-cli.md
29+
- name: Bicep
30+
displayName: ARM, Resource Manager, Template
31+
href: quickstart-load-balancer-standard-internal-bicep.md
2932
- name: ARM template
3033
displayName: Resource Manager
3134
href: quickstart-load-balancer-standard-internal-template.md
@@ -196,7 +199,7 @@
196199
href: upgrade-internalbasic-to-publicstandard.md
197200
- name: Using multiple IP configurations
198201
items:
199-
- name: Azure Portal
202+
- name: Azure portal
200203
href: load-balancer-multiple-ip.md
201204
- name: Azure CLI
202205
href: load-balancer-multiple-ip-cli.md
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
title: 'Quickstart: Create an internal Azure load balancer using Bicep'
3+
description: This quickstart shows how to create an internal Azure load balancer using Bicep.
4+
services: load-balancer
5+
author: schaffererin
6+
ms.service: load-balancer
7+
ms.topic: quickstart
8+
ms.custom: subject-armqs, mode-arm
9+
ms.author: v-eschaffer
10+
ms.date: 04/29/2022
11+
---
12+
13+
# Quickstart: Create an internal load balancer to load balance VMs by using Bicep
14+
15+
This quickstart describes how to use Bicep to create an internal Azure load balancer.
16+
17+
[!INCLUDE [About Bicep](../../includes/resource-manager-quickstart-bicep-introduction.md)]
18+
19+
## Prerequisites
20+
21+
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
22+
23+
## Review the Bicep file
24+
25+
The Bicep file used in this quickstart is from the [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/2-vms-internal-load-balancer/).
26+
27+
:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.compute/2-vms-internal-load-balancer/main.bicep":::
28+
29+
Multiple Azure resources have been defined in the Bicep file:
30+
31+
- [**Microsoft.Storage/storageAccounts**](/azure/templates/microsoft.storage/storageaccounts): Virtual machine storage accounts for boot diagnostics.
32+
- [**Microsoft.Compute/availabilitySets**](/azure/templates/microsoft.compute/availabilitySets): Availability set for virtual machines.
33+
- [**Microsoft.Network/virtualNetworks**](/azure/templates/microsoft.network/virtualNetworks): Virtual network for load balancer and virtual machines.
34+
- [**Microsoft.Network/networkInterfaces**](/azure/templates/microsoft.network/networkInterfaces): Network interfaces for virtual machines.
35+
- [**Microsoft.Network/loadBalancers**](/azure/templates/microsoft.network/loadBalancers): Internal load balancer.
36+
- [**Microsoft.Compute/virtualMachines**](/azure/templates/microsoft.compute/virtualMachines): Virtual machines.
37+
38+
## Deploy the Bicep file
39+
40+
1. Save the Bicep file as **main.bicep** to your local computer.
41+
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
42+
43+
# [CLI](#tab/CLI)
44+
45+
```azurecli
46+
az group create --name exampleRG --location eastus
47+
az deployment group create --resource-group exampleRG --template-file main.bicep --parameters adminUsername=<admin-user>
48+
```
49+
50+
# [PowerShell](#tab/PowerShell)
51+
52+
```azurepowershell
53+
New-AzResourceGroup -Name exampleRG -Location eastus
54+
New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep -adminUsername "<admin-user>"
55+
```
56+
57+
---
58+
59+
> [!NOTE]
60+
> Replace **\<admin-user\>** with the admin username. You'll also be prompted to enter **adminPassword**.
61+
62+
When the deployment finishes, you should see a message indicating the deployment succeeded.
63+
64+
## Review deployed resources
65+
66+
Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group.
67+
68+
# [CLI](#tab/CLI)
69+
70+
```azurecli-interactive
71+
az resource list --resource-group exampleRG
72+
```
73+
74+
# [PowerShell](#tab/PowerShell)
75+
76+
```azurepowershell-interactive
77+
Get-AzResource -ResourceGroupName exampleRG
78+
```
79+
80+
---
81+
82+
## Clean up resources
83+
84+
When no longer needed, use the Azure portal, Azure CLI, or Azure PowerShell to delete the resource group and its resources.
85+
86+
# [CLI](#tab/CLI)
87+
88+
```azurecli-interactive
89+
az group delete --name exampleRG
90+
```
91+
92+
# [PowerShell](#tab/PowerShell)
93+
94+
```azurepowershell-interactive
95+
Remove-AzResourceGroup -Name exampleRG
96+
```
97+
98+
---
99+
100+
## Next steps
101+
102+
For a step-by-step tutorial that guides you through the process of creating a Bicep file, see:
103+
104+
> [!div class="nextstepaction"]
105+
> [Quickstart: Create Bicep files with Visual Studio Code](../azure-resource-manager/bicep/quickstart-create-bicep-use-visual-studio-code.md)

0 commit comments

Comments
 (0)