FEATURES PRICING ABOUT DOCS LOGIN

azurerm_public_ip

Create a Public IP Address.

Example Usage

resource "azurerm_resource_group" "test" {
    name = "resourceGroup1"
    location = "West US"
}

resource "azurerm_public_ip" "test" {
    name = "acceptanceTestPublicIp1"
    location = "West US"
    resource_group_name = "${azurerm_resource_group.test.name}"
    public_ip_address_allocation = "static"
    
    tags {
        environment = "Production"
    }
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Import

Public IPs can be imported using the resource id, e.g.

terraform import azurerm_public_ip.myPublicIp /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/publicIPAddresses/myPublicIpAddress1

See the source of this document at Terraform.io

REQUEST A DEMO