GetPublicIP

Use this data source to access information about an existing Public IP Address.

Example Usage

Reference An Existing)

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Network.GetPublicIP.InvokeAsync(new Azure.Network.GetPublicIPArgs
        {
            Name = "name_of_public_ip",
            ResourceGroupName = "name_of_resource_group",
        }));
        this.DomainNameLabel = example.Apply(example => example.DomainNameLabel);
        this.PublicIpAddress = example.Apply(example => example.IpAddress);
    }

    [Output("domainNameLabel")]
    public Output<string> DomainNameLabel { get; set; }
    [Output("publicIpAddress")]
    public Output<string> PublicIpAddress { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := network.GetPublicIP(ctx, &network.GetPublicIPArgs{
            Name:              "name_of_public_ip",
            ResourceGroupName: "name_of_resource_group",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("domainNameLabel", example.DomainNameLabel)
        ctx.Export("publicIpAddress", example.IpAddress)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.network.get_public_ip(name="name_of_public_ip",
    resource_group_name="name_of_resource_group")
pulumi.export("domainNameLabel", example.domain_name_label)
pulumi.export("publicIpAddress", example.ip_address)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.network.getPublicIP({
    name: "name_of_public_ip",
    resourceGroupName: "name_of_resource_group",
});
export const domainNameLabel = example.then(example => example.domainNameLabel);
export const publicIpAddress = example.then(example => example.ipAddress);

Using GetPublicIP

function getPublicIP(args: GetPublicIPArgs, opts?: InvokeOptions): Promise<GetPublicIPResult>
function  get_public_ip(name=None, resource_group_name=None, tags=None, zones=None, opts=None)
func GetPublicIP(ctx *Context, args *GetPublicIPArgs, opts ...InvokeOption) (*GetPublicIPResult, error)
public static class GetPublicIP {
    public static Task<GetPublicIPResult> InvokeAsync(GetPublicIPArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

Specifies the name of the public IP address.

ResourceGroupName string

Specifies the name of the resource group.

Tags Dictionary<string, string>

A mapping of tags to assigned to the resource.

Zones List<string>
Name string

Specifies the name of the public IP address.

ResourceGroupName string

Specifies the name of the resource group.

Tags map[string]string

A mapping of tags to assigned to the resource.

Zones []string
name string

Specifies the name of the public IP address.

resourceGroupName string

Specifies the name of the resource group.

tags {[key: string]: string}

A mapping of tags to assigned to the resource.

zones string[]
name str

Specifies the name of the public IP address.

resource_group_name str

Specifies the name of the resource group.

tags Dict[str, str]

A mapping of tags to assigned to the resource.

zones List[str]

GetPublicIP Result

The following output properties are available:

AllocationMethod string
DomainNameLabel string

The label for the Domain Name.

Fqdn string

Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.

Id string

The provider-assigned unique ID for this managed resource.

IdleTimeoutInMinutes int

Specifies the timeout for the TCP idle connection.

IpAddress string

The IP address value that was allocated.

IpVersion string

The IP version being used, for example IPv4 or IPv6.

Location string
Name string
ResourceGroupName string
ReverseFqdn string
Sku string
Zones List<string>
Tags Dictionary<string, string>

A mapping of tags to assigned to the resource.

AllocationMethod string
DomainNameLabel string

The label for the Domain Name.

Fqdn string

Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.

Id string

The provider-assigned unique ID for this managed resource.

IdleTimeoutInMinutes int

Specifies the timeout for the TCP idle connection.

IpAddress string

The IP address value that was allocated.

IpVersion string

The IP version being used, for example IPv4 or IPv6.

Location string
Name string
ResourceGroupName string
ReverseFqdn string
Sku string
Zones []string
Tags map[string]string

A mapping of tags to assigned to the resource.

allocationMethod string
domainNameLabel string

The label for the Domain Name.

fqdn string

Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.

id string

The provider-assigned unique ID for this managed resource.

idleTimeoutInMinutes number

Specifies the timeout for the TCP idle connection.

ipAddress string

The IP address value that was allocated.

ipVersion string

The IP version being used, for example IPv4 or IPv6.

location string
name string
resourceGroupName string
reverseFqdn string
sku string
zones string[]
tags {[key: string]: string}

A mapping of tags to assigned to the resource.

allocation_method str
domain_name_label str

The label for the Domain Name.

fqdn str

Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.

id str

The provider-assigned unique ID for this managed resource.

idle_timeout_in_minutes float

Specifies the timeout for the TCP idle connection.

ip_address str

The IP address value that was allocated.

ip_version str

The IP version being used, for example IPv4 or IPv6.

location str
name str
resource_group_name str
reverse_fqdn str
sku str
zones List[str]
tags Dict[str, str]

A mapping of tags to assigned to the resource.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.