Skip to content

Commit 9ac1b56

Browse files
committed
acrolinx, formatting fixes
1 parent 313f318 commit 9ac1b56

File tree

1 file changed

+78
-40
lines changed

1 file changed

+78
-40
lines changed
Lines changed: 78 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
---
22
title: 'Create a NAT gateway - Resource Manager Template'
3-
titleSuffix: Azure Virtual Network NAT
3+
titleSuffix: Azure NAT Gateway
44
description: This quickstart shows how to create a NAT gateway by using the Azure Resource Manager template (ARM template).
5-
services: load-balancer
65
author: asudbring
7-
manager: KumudD
86
ms.service: virtual-network
97
ms.topic: how-to
10-
ms.workload: infrastructure-services
11-
ms.date: 10/27/2020
8+
ms.date: 04/24/2023
129
ms.author: allensu
1310
ms.custom: subject-armqs, devx-track-arm-template
1411
# Customer intent: I want to create a NAT gateway by using an Azure Resource Manager template so that I can provide outbound connectivity for my virtual machines.
@@ -26,16 +23,41 @@ If your environment meets the prerequisites and you're familiar with using ARM t
2623

2724
## Prerequisites
2825

29-
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
26+
# [**Portal**](#tab/create-nat-portal)
3027

28+
- If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
29+
30+
# [**PowerShell**](#tab/create-nat-powershell)
31+
32+
- If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
33+
34+
- Azure PowerShell installed locally or Azure Cloud Shell.
35+
36+
- Sign in to Azure PowerShell and ensure you've selected the subscription with which you want to use this feature. For more information, see [Sign in with Azure PowerShell](/powershell/azure/authenticate-azureps).
37+
38+
- Ensure your `Az.Network` module is 4.3.0 or later. To verify the installed module, use the command `Get-InstalledModule -Name "Az.Network"`. If the module requires an update, use the command `Update-Module -Name Az.Network` if necessary.
39+
40+
If you choose to install and use PowerShell locally, this article requires the Azure PowerShell module version 5.4.1 or later. Run `Get-Module -ListAvailable Az` to find the installed version. If you need to upgrade, see [Install Azure PowerShell module](/powershell/azure/install-Az-ps). If you're running PowerShell locally, you also need to run `Connect-AzAccount` to create a connection with Azure.
41+
42+
# [**Azure CLI**](#tab/create-nat-cli)
43+
44+
- If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
45+
46+
[!INCLUDE [azure-cli-prepare-your-environment-no-header.md](~/articles/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
47+
48+
- This how-to article requires version 2.31.0 or later of the Azure CLI. If using Azure Cloud Shell, the latest version is already installed.
49+
50+
---
3151
## Review the template
3252

3353
The template used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/nat-gateway-1-vm).
3454

3555
This template is configured to create a:
3656

3757
* Virtual network
58+
3859
* NAT gateway resource
60+
3961
* Ubuntu virtual machine
4062

4163
The Ubuntu VM is deployed to a subnet that's associated with the NAT gateway resource.
@@ -45,34 +67,42 @@ The Ubuntu VM is deployed to a subnet that's associated with the NAT gateway res
4567
Nine Azure resources are defined in the template:
4668

4769
* **[Microsoft.Network/networkSecurityGroups](/azure/templates/microsoft.network/networksecuritygroups)**: Creates a network security group.
70+
4871
* **[Microsoft.Network/networkSecurityGroups/securityRules](/azure/templates/microsoft.network/networksecuritygroups/securityrules)**: Creates a security rule.
72+
4973
* **[Microsoft.Network/publicIPAddresses](/azure/templates/microsoft.network/publicipaddresses)**: Creates a public IP address.
74+
5075
* **[Microsoft.Network/publicIPPrefixes](/azure/templates/microsoft.network/publicipprefixes)**: Creates a public IP prefix.
76+
5177
* **[Microsoft.Compute/virtualMachines](/azure/templates/Microsoft.Compute/virtualMachines)**: Creates a virtual machine.
78+
5279
* **[Microsoft.Network/virtualNetworks](/azure/templates/microsoft.network/virtualnetworks)**: Creates a virtual network.
80+
5381
* **[Microsoft.Network/natGateways](/azure/templates/microsoft.network/natgateways)**: Creates a NAT gateway resource.
82+
5483
* **[Microsoft.Network/virtualNetworks/subnets](/azure/templates/microsoft.network/virtualnetworks/subnets)**: Creates a virtual network subnet.
84+
5585
* **[Microsoft.Network/networkinterfaces](/azure/templates/microsoft.network/networkinterfaces)**: Creates a network interface.
5686

5787
## Deploy the template
5888

59-
**Azure CLI**
89+
# [**Portal**](#tab/create-nat-portal)
6090

61-
```azurecli-interactive
62-
read -p "Enter the location (i.e. westcentralus): " location
63-
resourceGroupName="myResourceGroupNAT"
64-
templateUri="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.network/nat-gateway-1-vm/azuredeploy.json"
91+
[![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.network%2Fnat-gateway-1-vm%2Fazuredeploy.json)
6592

66-
az group create \
67-
--name $resourceGroupName \
68-
--location $location
93+
## Review deployed resources
6994

70-
az deployment group create \
71-
--resource-group $resourceGroupName \
72-
--template-uri $templateUri
73-
```
95+
1. Sign in to the [Azure portal](https://portal.azure.com).
96+
97+
1. Select **Resource groups** from the left pane.
98+
99+
1. Select the resource group that you created in the previous section. The default resource group name is **myResourceGroupNAT**
100+
101+
1. Verify the following resources were created in the resource group:
102+
103+
![Virtual Network NAT resource group](./media/quick-create-template/nat-gateway-template-rg.png)
74104

75-
**Azure PowerShell**
105+
# [**PowerShell**](#tab/create-nat-powershell)
76106

77107
```azurepowershell-interactive
78108
$location = Read-Host -Prompt "Enter the location (i.e. westcentralus)"
@@ -84,57 +114,65 @@ New-AzResourceGroup -Name $resourceGroupName -Location $location
84114
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri $templateUri
85115
```
86116

87-
**Azure portal**
88-
89-
[![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.network%2Fnat-gateway-1-vm%2Fazuredeploy.json)
90-
91-
## Review deployed resources
117+
# [**Azure CLI**](#tab/create-nat-cli)
92118

93-
1. Sign in to the [Azure portal](https://portal.azure.com).
94-
95-
1. Select **Resource groups** from the left pane.
119+
```azurecli-interactive
120+
read -p "Enter the location (i.e. westcentralus): " location
121+
resourceGroupName="myResourceGroupNAT"
122+
templateUri="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.network/nat-gateway-1-vm/azuredeploy.json"
96123
97-
1. Select the resource group that you created in the previous section. The default resource group name is **myResourceGroupNAT**
124+
az group create \
125+
--name $resourceGroupName \
126+
--location $location
98127
99-
1. Verify the following resources were created in the resource group:
128+
az deployment group create \
129+
--resource-group $resourceGroupName \
130+
--template-uri $templateUri
131+
```
100132

101-
![Virtual Network NAT resource group](./media/quick-create-template/nat-gateway-template-rg.png)
133+
---
102134

103135
## Clean up resources
104136

105-
**Azure CLI**
106-
107-
When no longer needed, you can use the [az group delete](/cli/azure/group#az-group-delete) command to remove the resource group and all resources contained within.
137+
# [**Portal**](#tab/create-nat-portal)
108138

109-
```azurecli-interactive
110-
az group delete \
111-
--name myResourceGroupNAT
112-
```
139+
When no longer needed, delete the resource group, NAT gateway, and all related resources. Select the resource group **myResourceGroupNAT** that contains the NAT gateway, and then select **Delete**.
113140

114-
**Azure PowerShell**
141+
# [**PowerShell**](#tab/create-nat-powershell)
115142

116143
When no longer needed, you can use the [Remove-AzResourceGroup](/powershell/module/az.resources/remove-azresourcegroup) command to remove the resource group and all resources contained within.
117144

118145
```azurepowershell-interactive
119146
Remove-AzResourceGroup -Name myResourceGroupNAT
120147
```
121148

122-
**Azure portal**
149+
# [**Azure CLI**](#tab/create-nat-cli)
123150

124-
When no longer needed, delete the resource group, NAT gateway, and all related resources. Select the resource group **myResourceGroupNAT** that contains the NAT gateway, and then select **Delete**.
151+
When no longer needed, you can use the [az group delete](/cli/azure/group#az-group-delete) command to remove the resource group and all resources contained within.
152+
153+
```azurecli-interactive
154+
az group delete \
155+
--name myResourceGroupNAT
156+
```
157+
158+
---
125159

126160
## Next steps
127161

128162
In this quickstart, you created a:
129163

130164
* NAT gateway resource
165+
131166
* Virtual network
167+
132168
* Ubuntu virtual machine
133169

134170
The virtual machine is deployed to a virtual network subnet associated with the NAT gateway.
135171

136172
To learn more about Virtual Network NAT and Azure Resource Manager, continue to the articles below.
137173

138174
* Read an [Overview of Virtual Network NAT](nat-overview.md)
175+
139176
* Read about the [NAT Gateway resource](nat-gateway-resource.md)
177+
140178
* Learn more about [Azure Resource Manager](../../azure-resource-manager/management/overview.md)

0 commit comments

Comments
 (0)