» azurerm_public_ip_prefix
Manage a Public IP Prefix.
NOTE Public IP Prefix are currently in Public Preview. You can find more information about Public IP Preifx Preview here.
» Example Usage
resource "azurerm_resource_group" "test" {
name = "resourceGroup1"
location = "West Europe"
}
resource "azurerm_public_ip_prefix" "test" {
name = "acceptanceTestPublicIpPrefix1"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
prefix_length = 31
tags = {
environment = "Production"
}
}
» Argument Reference
The following arguments are supported:
-
name
- (Required) Specifies the name of the Public IP resource . Changing this forces a new resource to be created. -
resource_group_name
- (Required) The name of the resource group in which to create the public IP. -
location
- (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. -
sku
- (Optional) The SKU of the Public IP Prefix. Accepted values areStandard
. Defaults toStandard
. Changing this forces a new resource to be created.
Note Public IP Prefix can only be created with Standard SKUs at this time.
-
prefix_length
- (Optional) Specifies the number of bits of the prefix. The value can be set between 24 (256 addresses) and 31 (2 addresses). Changing this forces a new resource to be created.
Please Note:: There may be Public IP address limits on the subscription . More information available here
-
tags
- (Optional) A mapping of tags to assign to the resource. -
zones
- (Optional) A collection containing the availability zone to allocate the Public IP in.
Please Note: Availability Zones are only supported in several regions at this time.
» Attributes Reference
The following attributes are exported:
» Import
Public IP Prefixes can be imported using the resource id
, e.g.
terraform import azurerm_public_ip_prefix.myPublicIpPrefix /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/publicIPFixes/myPublicIpPrefix1