We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to access information about a set of existing Public IP Addresses.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Network.GetPublicIPs.InvokeAsync(new Azure.Network.GetPublicIPsArgs
{
AttachmentStatus = "Attached",
ResourceGroupName = "pip-test",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.GetPublicIPs(ctx, &network.GetPublicIPsArgs{
AttachmentStatus: pulumi.StringRef("Attached"),
ResourceGroupName: "pip-test",
}, nil)
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = pulumi.output(azure.network.getPublicIPs({
attachmentStatus: "Attached",
resourceGroupName: "pip-test",
}));
import pulumi
import pulumi_azure as azure
example = azure.network.get_public_i_ps(attachment_status="Attached",
resource_group_name="pip-test")
Example coming soon!
Using getPublicIPs
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getPublicIPs(args: GetPublicIPsArgs, opts?: InvokeOptions): Promise<GetPublicIPsResult>
function getPublicIPsOutput(args: GetPublicIPsOutputArgs, opts?: InvokeOptions): Output<GetPublicIPsResult>def get_public_i_ps(allocation_type: Optional[str] = None,
attached: Optional[bool] = None,
attachment_status: Optional[str] = None,
name_prefix: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPublicIPsResult
def get_public_i_ps_output(allocation_type: Optional[pulumi.Input[str]] = None,
attached: Optional[pulumi.Input[bool]] = None,
attachment_status: Optional[pulumi.Input[str]] = None,
name_prefix: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPublicIPsResult]func GetPublicIPs(ctx *Context, args *GetPublicIPsArgs, opts ...InvokeOption) (*GetPublicIPsResult, error)
func GetPublicIPsOutput(ctx *Context, args *GetPublicIPsOutputArgs, opts ...InvokeOption) GetPublicIPsResultOutput> Note: This function is named GetPublicIPs in the Go SDK.
public static class GetPublicIPs
{
public static Task<GetPublicIPsResult> InvokeAsync(GetPublicIPsArgs args, InvokeOptions? opts = null)
public static Output<GetPublicIPsResult> Invoke(GetPublicIPsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPublicIPsResult> getPublicIPs(GetPublicIPsArgs args, InvokeOptions options)
public static Output<GetPublicIPsResult> getPublicIPs(GetPublicIPsArgs args, InvokeOptions options)
fn::invoke:
function: azure:network/getPublicIPs:getPublicIPs
arguments:
# arguments dictionaryThe following arguments are supported:
- Resource
Group stringName - Specifies the name of the resource group.
- Allocation
Type string - The Allocation Type for the Public IP Address. Possible values include
StaticorDynamic. - Attached bool
- Attachment
Status string - Filter to include IP Addresses which are attached to a device, such as a VM/LB (
Attached) or unattached (Unattached). To allow for both, useAll. - Name
Prefix string - A prefix match used for the IP Addresses
namefield, case sensitive.
- Resource
Group stringName - Specifies the name of the resource group.
- Allocation
Type string - The Allocation Type for the Public IP Address. Possible values include
StaticorDynamic. - Attached bool
- Attachment
Status string - Filter to include IP Addresses which are attached to a device, such as a VM/LB (
Attached) or unattached (Unattached). To allow for both, useAll. - Name
Prefix string - A prefix match used for the IP Addresses
namefield, case sensitive.
- resource
Group StringName - Specifies the name of the resource group.
- allocation
Type String - The Allocation Type for the Public IP Address. Possible values include
StaticorDynamic. - attached Boolean
- attachment
Status String - Filter to include IP Addresses which are attached to a device, such as a VM/LB (
Attached) or unattached (Unattached). To allow for both, useAll. - name
Prefix String - A prefix match used for the IP Addresses
namefield, case sensitive.
- resource
Group stringName - Specifies the name of the resource group.
- allocation
Type string - The Allocation Type for the Public IP Address. Possible values include
StaticorDynamic. - attached boolean
- attachment
Status string - Filter to include IP Addresses which are attached to a device, such as a VM/LB (
Attached) or unattached (Unattached). To allow for both, useAll. - name
Prefix string - A prefix match used for the IP Addresses
namefield, case sensitive.
- resource_
group_ strname - Specifies the name of the resource group.
- allocation_
type str - The Allocation Type for the Public IP Address. Possible values include
StaticorDynamic. - attached bool
- attachment_
status str - Filter to include IP Addresses which are attached to a device, such as a VM/LB (
Attached) or unattached (Unattached). To allow for both, useAll. - name_
prefix str - A prefix match used for the IP Addresses
namefield, case sensitive.
- resource
Group StringName - Specifies the name of the resource group.
- allocation
Type String - The Allocation Type for the Public IP Address. Possible values include
StaticorDynamic. - attached Boolean
- attachment
Status String - Filter to include IP Addresses which are attached to a device, such as a VM/LB (
Attached) or unattached (Unattached). To allow for both, useAll. - name
Prefix String - A prefix match used for the IP Addresses
namefield, case sensitive.
getPublicIPs Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Public
Ips List<GetPublic IPs Public Ip> - A List of
public_ipsblocks as defined below filtered by the criteria above. - Resource
Group stringName - Allocation
Type string - Attached bool
- Attachment
Status string - Name
Prefix string
- Id string
- The provider-assigned unique ID for this managed resource.
- Public
Ips []GetPublic IPs Public Ip - A List of
public_ipsblocks as defined below filtered by the criteria above. - Resource
Group stringName - Allocation
Type string - Attached bool
- Attachment
Status string - Name
Prefix string
- id String
- The provider-assigned unique ID for this managed resource.
- public
Ips List<GetPublic IPs Public Ip> - A List of
public_ipsblocks as defined below filtered by the criteria above. - resource
Group StringName - allocation
Type String - attached Boolean
- attachment
Status String - name
Prefix String
- id string
- The provider-assigned unique ID for this managed resource.
- public
Ips GetPublic IPs Public Ip[] - A List of
public_ipsblocks as defined below filtered by the criteria above. - resource
Group stringName - allocation
Type string - attached boolean
- attachment
Status string - name
Prefix string
- id str
- The provider-assigned unique ID for this managed resource.
- public_
ips Sequence[GetPublic IPs Public Ip] - A List of
public_ipsblocks as defined below filtered by the criteria above. - resource_
group_ strname - allocation_
type str - attached bool
- attachment_
status str - name_
prefix str
- id String
- The provider-assigned unique ID for this managed resource.
- public
Ips List<Property Map> - A List of
public_ipsblocks as defined below filtered by the criteria above. - resource
Group StringName - allocation
Type String - attached Boolean
- attachment
Status String - name
Prefix String
Supporting Types
GetPublicIPsPublicIp
- Domain
Name stringLabel - The Domain Name Label of the Public IP Address
- Fqdn string
- The FQDN of the Public IP Address
- Id string
- The ID of the Public IP Address
- Ip
Address string - The IP address of the Public IP Address
- Name string
- The Name of the Public IP Address
- Domain
Name stringLabel - The Domain Name Label of the Public IP Address
- Fqdn string
- The FQDN of the Public IP Address
- Id string
- The ID of the Public IP Address
- Ip
Address string - The IP address of the Public IP Address
- Name string
- The Name of the Public IP Address
- domain
Name StringLabel - The Domain Name Label of the Public IP Address
- fqdn String
- The FQDN of the Public IP Address
- id String
- The ID of the Public IP Address
- ip
Address String - The IP address of the Public IP Address
- name String
- The Name of the Public IP Address
- domain
Name stringLabel - The Domain Name Label of the Public IP Address
- fqdn string
- The FQDN of the Public IP Address
- id string
- The ID of the Public IP Address
- ip
Address string - The IP address of the Public IP Address
- name string
- The Name of the Public IP Address
- domain_
name_ strlabel - The Domain Name Label of the Public IP Address
- fqdn str
- The FQDN of the Public IP Address
- id str
- The ID of the Public IP Address
- ip_
address str - The IP address of the Public IP Address
- name str
- The Name of the Public IP Address
- domain
Name StringLabel - The Domain Name Label of the Public IP Address
- fqdn String
- The FQDN of the Public IP Address
- id String
- The ID of the Public IP Address
- ip
Address String - The IP address of the Public IP Address
- name String
- The Name of the Public IP Address
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
