Skip to content

Commit ef3e4f3

Browse files
Merge pull request #314328 from brianlehr/ipv2terraform
Add Standardv2 SKU tabs to Terraform public IP and prefix docs
2 parents 631b9e1 + 5e418d1 commit ef3e4f3

2 files changed

Lines changed: 63 additions & 2 deletions

File tree

articles/virtual-network/ip-services/create-public-ip-prefix-terraform.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ In this article, you learn how to:
2929
> * Create a random pet name for the Azure resource group name using [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
3030
> * Create an Azure resource group using [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
3131
> * Create a standard zone-redundant public IPv4 address prefix named **myIPv4**
32+
> * Create a standard v2 zone-redundant public IPv4 address prefix named **myIPv4Stdv2**
3233
> * Create a standard zonal public IPv4 address named **myIPv4Zonal**
3334
> * Create a standard public IPv4 address named **myIPv4RPInternet** that supports the Routing Preference feature
3435
> * Create a standard zone-redundant public IPv6 address prefix named **myIPv6**
36+
> * Create a standard v2 zone-redundant public IPv6 address prefix named **myIPv6Stdv2**
3537
> * Create a standard zonal public IPv6 address named **myIPv6Zonal**
3638
> * Create a static public IP IPv4 address from an IP prefix
3739
> * Create a static public IP IPv6 address from an IP prefix
@@ -67,6 +69,22 @@ To create an IPv4 public IP prefix, specify **IPv4** as the `ip_version` value.
6769

6870
:::code language="terraform" source="~/terraform_samples/quickstart/101-virtual-network-public-ip-prefix/main.tf" range="12-22" highlight="7-8,10":::
6971

72+
# [Zone-Redundant Standardv2 IPv4 prefix](#tab/ipv4-v2-zone-redundant)
73+
74+
To create a Standard v2 IPv4 public IP prefix, specify **IPv4** as the `ip_version` value. All Standardv2 IPv4 public IP prefixes must be zone-redundant, so specify **["1", "2", "3"]** as the `zones` value.
75+
76+
```terraform
77+
resource "azurerm_public_ip_prefix" "public_ip_prefix_ipv4_stdv2" {
78+
name = "myIPv4Stdv2"
79+
resource_group_name = azurerm_resource_group.rg.name
80+
location = azurerm_resource_group.rg.location
81+
ip_version = "IPv4"
82+
prefix_length = 28
83+
sku = "Standard_v2"
84+
zones = ["1", "2", "3"]
85+
}
86+
```
87+
7088
# [Zonal IPv4 prefix](#tab/ipv4-zonal)
7189

7290
To create an IPv4 public IP prefix, specify **IPv4** as the `ip_version` value. To create a zonal IP prefix in zone 2, specify **["2"]** as the `zone` value.
@@ -94,6 +112,22 @@ To create an IPv6 public IP prefix, specify **IPv6** as the `ip_version` value.
94112

95113
:::code language="terraform" source="~/terraform_samples/quickstart/101-virtual-network-public-ip-prefix/main.tf" range="60-70" highlight="7-8,10":::
96114

115+
# [Zone-Redundant Standardv2 IPv6 prefix](#tab/ipv6-v2-zone-redundant)
116+
117+
To create a Standard v2 IPv6 public IP prefix, specify **IPv6** as the `ip_version` value. All Standardv2 IPv6 public IP prefixes must be zone-redundant, so specify **["1", "2", "3"]** as the `zones` value.
118+
119+
```terraform
120+
resource "azurerm_public_ip_prefix" "public_ip_prefix_ipv6_stdv2" {
121+
name = "myIPv6Stdv2"
122+
resource_group_name = azurerm_resource_group.rg.name
123+
location = azurerm_resource_group.rg.location
124+
ip_version = "IPv6"
125+
prefix_length = 124
126+
sku = "Standard_v2"
127+
zones = ["1", "2", "3"]
128+
}
129+
```
130+
97131
# [Zonal IPv6 prefix](#tab/ipv6-zonal)
98132

99133
To create an IPv6 public IP prefix, specify **IPv6** as the `ip_version` value. To create a zone redundant IPv6 prefix, specify **["2"]** as the `zone` value.

articles/virtual-network/ip-services/create-public-ip-terraform.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ In this article, you learn how to:
2828
> * Create a random pet name for the Azure resource group name using [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet)
2929
> * Create an Azure resource group using [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
3030
> * Create a standard zone-redundant public IPv4 address named **myStandardPublicIP**
31+
> * Create a standard v2 zone-redundant public IPv4 address named **myStandardv2PublicIP**
3132
> * Create a standard zonal public IPv4 address in Zone 2 named **myZonalStandardPublicIP**
3233
> * Create a standard static public IPv4 address named **myRoutingPreferenceStandardPublicIP** that supports the Routing Preference feature
3334
> * Create a standard static public IPv4 address named **myGlobalTierStandardPublicIP** that supports the Global Tier feature
@@ -45,7 +46,7 @@ An Azure resource group is a logical container into which Azure resources are de
4546

4647
## Create public IP
4748

48-
# [Standard SKU](#tab/create-public-ip-standard)
49+
# [Zone-Redundant Standard SKU](#tab/create-public-ip-standard)
4950

5051
### Create a standard zone-redundant IP address
5152

@@ -62,9 +63,35 @@ In this section, you learn how to create a standard zone-redundant public IP add
6263
> For versions of the API older than 2020-08-01, omit the `zone` field to create a zone-redundant IP address.
6364
>
6465
66+
# [Zone-Redundant Standardv2 SKU](#tab/create-public-ip-standardv2)
6567

68+
### Create a standard v2 zone-redundant IP address
6669

67-
# [Zonal](#tab/create-public-ip-zonal)
70+
>[!NOTE]
71+
>Standard v2 SKU public IP is required for use of the Standard v2 NAT Gateway with zone-redundancy. For more information about SKUs, see **[Public IP addresses](public-ip-addresses.md)**.
72+
>
73+
>The following command snippet works for API version **2020-08-01** or **later**. For more information about the API version currently being used, see [Resource Providers and Types](../../azure-resource-manager/management/resource-providers-and-types.md).
74+
75+
The following code snippet creates a standard v2 zone-redundant public IPv4 address named **myStandardv2PublicIP**.
76+
77+
To create an IPv6 address, set the `ip_version` value to **IPv6**.
78+
79+
```terraform
80+
resource "azurerm_public_ip" "public_ip_standardv2" {
81+
name = "myStandardv2PublicIP"
82+
resource_group_name = azurerm_resource_group.rg.name
83+
location = azurerm_resource_group.rg.location
84+
allocation_method = "Static"
85+
sku = "Standard_v2"
86+
zones = ["1", "2", "3"]
87+
}
88+
```
89+
90+
> [!IMPORTANT]
91+
> For versions of the API older than 2020-08-01, omit the `zones` field to create a zone-redundant IP address.
92+
>
93+
94+
# [Zonal Standard SKU](#tab/create-public-ip-zonal)
6895

6996
### Create a zonal public IP address
7097

0 commit comments

Comments
 (0)