Skip to content

Commit 7901847

Browse files
authored
Merge pull request #108401 from asudbring/natpatch
Json fixes in resource doc
2 parents 525daf3 + f3c5024 commit 7901847

File tree

1 file changed

+18
-62
lines changed

1 file changed

+18
-62
lines changed

articles/virtual-network/nat-gateway-resource.md

Lines changed: 18 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -58,75 +58,31 @@ NAT is recommended for most workloads unless you have a specific dependency on [
5858

5959
You can migrate from standard load balancer scenarios, including [outbound rules](../load-balancer/load-balancer-outbound-rules-overview.md), to NAT gateway. To migrate, move the public ip and public ip prefix resources from load balancer frontends to NAT gateway. New IP addresses for NAT gateway aren't required. Standard public IP and prefix can be reused as long as the total doesn't exceed 16 IP addresses. Plan for migration with service interruption in mind during the transition. You can minimize the interruption by automating the process. Test the migration in a staging environment first. During the transition, inbound originated flows aren't affected.
6060

61-
The following example would create a NAT gateway resource called _myNATGateway_ is created in region _East US 2, AZ 1_ with a _4-minutes_ idle timeout. The outbound IP addresses provided are:
62-
- A set of public IP address resources _myIP1_ and _myIP2_ and
63-
- A set of public IP prefix resources _myPrefix1_ and _myPrefix2_.
64-
65-
The total number of IP addresses provided by all four IP address resources can't exceed 16 IP addresses total. Any number of IP addresses between 1 and 16 is allowed.
66-
67-
```json
68-
{
69-
"name": "myNATGateway",
70-
"type": "Microsoft.Network/natGateways",
71-
   "apiVersion": "2018-11-01",
72-
   "location": "East US 2",
73-
   "sku": { "name": "Standard" },
74-
   "zones": [ "1" ],
75-
   "properties": {
76-
"idleTimeoutInMinutes": 4, 
77-
      "publicIPPrefixes": [
78-
       {
79-
          "id": "ref to myPrefix1"
80-
         },
81-
         {
82-
            "id": "ref to myPrefix2"
83-
         }
84-
      ],
85-
      "publicIPAddresses": [
86-
       {
87-
         "id": "ref to myIP1"
88-
         },
89-
         {
90-
            "id": "ref to myIP2"
91-
         }
92-
      ]
93-
}
94-
}
95-
```
61+
The following example is a snippet from an Azure Resource Manager template. This template deploys several resources, including a NAT gateway. The template has the following parameters in this example:
62+
63+
- **natgatewayname** - Name of the NAT gateway.
64+
- **location** - Azure region where resource is located.
65+
- **publicipname** - Name of the outbound public IP associated with the NAT gateway.
66+
- **publicipprefixname** - Name of the outbound public IP prefix associated with the NAT gateway.
67+
- **vnetname** - Name of the virtual network.
68+
- **subnetname** - Name of the subnet associated with the NAT gateway.
69+
70+
The total number of IP addresses provided by all IP address and prefix resources can't exceed 16 IP addresses total. Any number of IP addresses between 1 and 16 is allowed.
71+
72+
:::code language="json" source="~/quickstart-templates/101-nat-gateway-1-vm/azuredeploy.json" range="256-281":::
9673

9774
When the NAT gateway resource has been created, it can be used on one or more subnets of a virtual network. Specify which subnets use this NAT gateway resource. A NAT gateway isn't able to span more than one virtual network. It isn't required to assign the same NAT gateway to all subnets of a virtual network. Individual subnets can be configured with different NAT gateway resources.
9875

9976
Scenarios that don't use availability zones will be regional (no zone specified). If you're using availability zones, you can specify a zone to isolate NAT to a specific zone. Zone-redundancy isn't supported. Review NAT [availability zones](#availability-zones).
10077

78+
:::code language="json" source="~/quickstart-templates/101-nat-gateway-1-vm/azuredeploy.json" range="225-255" highlight="239-251":::
79+
80+
NAT gateways are defined with a property on a subnet within a virtual network. Flows created by virtual machines on subnet **subnetname** of virtual network **vnetname** will use the NAT gateway. All outbound connectivity will use the IP addresses associated with **natgatewayname** as the source IP address.
10181

102-
```json
103-
{
104-
"name": "myVNet",
105-
   "apiVersion": "2018-11-01",
106-
   "type": "Microsoft.Network/virtualNetworks",
107-
   "location": "myRegion",
108-
   "properties": {
109-
    "addressSpace": {
110-
       "addressPrefixes": [
111-
           "192.168.0.0/16"
112-
          ]
113-
},
114-
      "subnets": [
115-
       {
116-
          "name": "mySubnet1",
117-
            "properties": {
118-
             "addressPrefix": "192.168.0.0/24",
119-
               "natGateway": {
120-
                "id": "ref to myNATGateway"
121-
               }
122-
            }
123-
         }
124-
      ]
125-
   }
126-
}
127-
```
128-
NAT gateways are defined with a property on a subnet within a virtual network. Flows created by virtual machines on subnet _mySubnet1_ of virtual network _myVNet_ will use the NAT gateway. All outbound connectivity will use the IP addresses associated with _myNatGateway_ as the source IP address.
82+
For more information on the Azure Resource Manager template used in this example, see:
12983

84+
- [Quickstart: Create a NAT gateway - Resource Manager template](quickstart-create-nat-gateway-template.md)
85+
- [Virtual Network NAT](https://azure.microsoft.com/resources/templates/101-nat-gateway-1-vm/)
13086

13187
## Design Guidance
13288

0 commit comments

Comments
 (0)