1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsPublicAddressRanges
ibm 1.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud

ibm.getIsPublicAddressRanges

Explore with Pulumi AI

ibm logo
ibm 1.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud

    Retrieve information of an existing public address ranges as a read only data source. For more information, about an public address range, see , see creating public address range.

    Note: The Public Address Range feature is currently available only with the Select Availability.

    Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

    provider.tf

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
        }
    }
    
    {}
    

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const isPublicAddressRanges = ibm.getIsPublicAddressRanges({});
    
    import pulumi
    import pulumi_ibm as ibm
    
    is_public_address_ranges = ibm.get_is_public_address_ranges()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetIsPublicAddressRanges(ctx, &ibm.GetIsPublicAddressRangesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var isPublicAddressRanges = Ibm.GetIsPublicAddressRanges.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetIsPublicAddressRangesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var isPublicAddressRanges = IbmFunctions.getIsPublicAddressRanges();
    
        }
    }
    
    variables:
      isPublicAddressRanges:
        fn::invoke:
          function: ibm:getIsPublicAddressRanges
          arguments: {}
    

    Using getIsPublicAddressRanges

    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 getIsPublicAddressRanges(args: GetIsPublicAddressRangesArgs, opts?: InvokeOptions): Promise<GetIsPublicAddressRangesResult>
    function getIsPublicAddressRangesOutput(args: GetIsPublicAddressRangesOutputArgs, opts?: InvokeOptions): Output<GetIsPublicAddressRangesResult>
    def get_is_public_address_ranges(id: Optional[str] = None,
                                     resource_group: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetIsPublicAddressRangesResult
    def get_is_public_address_ranges_output(id: Optional[pulumi.Input[str]] = None,
                                     resource_group: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetIsPublicAddressRangesResult]
    func GetIsPublicAddressRanges(ctx *Context, args *GetIsPublicAddressRangesArgs, opts ...InvokeOption) (*GetIsPublicAddressRangesResult, error)
    func GetIsPublicAddressRangesOutput(ctx *Context, args *GetIsPublicAddressRangesOutputArgs, opts ...InvokeOption) GetIsPublicAddressRangesResultOutput

    > Note: This function is named GetIsPublicAddressRanges in the Go SDK.

    public static class GetIsPublicAddressRanges 
    {
        public static Task<GetIsPublicAddressRangesResult> InvokeAsync(GetIsPublicAddressRangesArgs args, InvokeOptions? opts = null)
        public static Output<GetIsPublicAddressRangesResult> Invoke(GetIsPublicAddressRangesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsPublicAddressRangesResult> getIsPublicAddressRanges(GetIsPublicAddressRangesArgs args, InvokeOptions options)
    public static Output<GetIsPublicAddressRangesResult> getIsPublicAddressRanges(GetIsPublicAddressRangesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsPublicAddressRanges:getIsPublicAddressRanges
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    (String) The unique identifier for this VPC.
    ResourceGroup string
    The ID of the Resource group this public gateway belongs to.
    Id string
    (String) The unique identifier for this VPC.
    ResourceGroup string
    The ID of the Resource group this public gateway belongs to.
    id String
    (String) The unique identifier for this VPC.
    resourceGroup String
    The ID of the Resource group this public gateway belongs to.
    id string
    (String) The unique identifier for this VPC.
    resourceGroup string
    The ID of the Resource group this public gateway belongs to.
    id str
    (String) The unique identifier for this VPC.
    resource_group str
    The ID of the Resource group this public gateway belongs to.
    id String
    (String) The unique identifier for this VPC.
    resourceGroup String
    The ID of the Resource group this public gateway belongs to.

    getIsPublicAddressRanges Result

    The following output properties are available:

    Id string
    (String) The unique identifier for this VPC.
    PublicAddressRanges List<GetIsPublicAddressRangesPublicAddressRange>
    (List) Collection of public address ranges.
    ResourceGroup string
    (List) The resource group for this public address range.
    Id string
    (String) The unique identifier for this VPC.
    PublicAddressRanges []GetIsPublicAddressRangesPublicAddressRange
    (List) Collection of public address ranges.
    ResourceGroup string
    (List) The resource group for this public address range.
    id String
    (String) The unique identifier for this VPC.
    publicAddressRanges List<GetIsPublicAddressRangesPublicAddressRange>
    (List) Collection of public address ranges.
    resourceGroup String
    (List) The resource group for this public address range.
    id string
    (String) The unique identifier for this VPC.
    publicAddressRanges GetIsPublicAddressRangesPublicAddressRange[]
    (List) Collection of public address ranges.
    resourceGroup string
    (List) The resource group for this public address range.
    id str
    (String) The unique identifier for this VPC.
    public_address_ranges Sequence[GetIsPublicAddressRangesPublicAddressRange]
    (List) Collection of public address ranges.
    resource_group str
    (List) The resource group for this public address range.
    id String
    (String) The unique identifier for this VPC.
    publicAddressRanges List<Property Map>
    (List) Collection of public address ranges.
    resourceGroup String
    (List) The resource group for this public address range.

    Supporting Types

    GetIsPublicAddressRangesPublicAddressRange

    AccessTags List<string>
    Cidr string
    (String) The public IPv4 range, expressed in CIDR format.
    CreatedAt string
    (String) The date and time that the public address range was created.
    Crn string
    (String) The CRN for this VPC.
    Href string
    (String) The URL for this zone.
    Id string
    (String) The unique identifier for this VPC.
    Ipv4AddressCount double
    (Integer) The number of IPv4 addresses in this public address range.
    LifecycleState string
    (String) The lifecycle state of the public address range.
    Name string
    (String) The globally unique name for this zone.
    ResourceGroups List<GetIsPublicAddressRangesPublicAddressRangeResourceGroup>
    The ID of the Resource group this public gateway belongs to.
    ResourceType string
    (String) The resource type.
    Tags List<string>
    Targets List<GetIsPublicAddressRangesPublicAddressRangeTarget>
    (List) The target this public address range is bound to.If absent, this public address range is not bound to a target.
    AccessTags []string
    Cidr string
    (String) The public IPv4 range, expressed in CIDR format.
    CreatedAt string
    (String) The date and time that the public address range was created.
    Crn string
    (String) The CRN for this VPC.
    Href string
    (String) The URL for this zone.
    Id string
    (String) The unique identifier for this VPC.
    Ipv4AddressCount float64
    (Integer) The number of IPv4 addresses in this public address range.
    LifecycleState string
    (String) The lifecycle state of the public address range.
    Name string
    (String) The globally unique name for this zone.
    ResourceGroups []GetIsPublicAddressRangesPublicAddressRangeResourceGroup
    The ID of the Resource group this public gateway belongs to.
    ResourceType string
    (String) The resource type.
    Tags []string
    Targets []GetIsPublicAddressRangesPublicAddressRangeTarget
    (List) The target this public address range is bound to.If absent, this public address range is not bound to a target.
    accessTags List<String>
    cidr String
    (String) The public IPv4 range, expressed in CIDR format.
    createdAt String
    (String) The date and time that the public address range was created.
    crn String
    (String) The CRN for this VPC.
    href String
    (String) The URL for this zone.
    id String
    (String) The unique identifier for this VPC.
    ipv4AddressCount Double
    (Integer) The number of IPv4 addresses in this public address range.
    lifecycleState String
    (String) The lifecycle state of the public address range.
    name String
    (String) The globally unique name for this zone.
    resourceGroups List<GetIsPublicAddressRangesPublicAddressRangeResourceGroup>
    The ID of the Resource group this public gateway belongs to.
    resourceType String
    (String) The resource type.
    tags List<String>
    targets List<GetIsPublicAddressRangesPublicAddressRangeTarget>
    (List) The target this public address range is bound to.If absent, this public address range is not bound to a target.
    accessTags string[]
    cidr string
    (String) The public IPv4 range, expressed in CIDR format.
    createdAt string
    (String) The date and time that the public address range was created.
    crn string
    (String) The CRN for this VPC.
    href string
    (String) The URL for this zone.
    id string
    (String) The unique identifier for this VPC.
    ipv4AddressCount number
    (Integer) The number of IPv4 addresses in this public address range.
    lifecycleState string
    (String) The lifecycle state of the public address range.
    name string
    (String) The globally unique name for this zone.
    resourceGroups GetIsPublicAddressRangesPublicAddressRangeResourceGroup[]
    The ID of the Resource group this public gateway belongs to.
    resourceType string
    (String) The resource type.
    tags string[]
    targets GetIsPublicAddressRangesPublicAddressRangeTarget[]
    (List) The target this public address range is bound to.If absent, this public address range is not bound to a target.
    access_tags Sequence[str]
    cidr str
    (String) The public IPv4 range, expressed in CIDR format.
    created_at str
    (String) The date and time that the public address range was created.
    crn str
    (String) The CRN for this VPC.
    href str
    (String) The URL for this zone.
    id str
    (String) The unique identifier for this VPC.
    ipv4_address_count float
    (Integer) The number of IPv4 addresses in this public address range.
    lifecycle_state str
    (String) The lifecycle state of the public address range.
    name str
    (String) The globally unique name for this zone.
    resource_groups Sequence[GetIsPublicAddressRangesPublicAddressRangeResourceGroup]
    The ID of the Resource group this public gateway belongs to.
    resource_type str
    (String) The resource type.
    tags Sequence[str]
    targets Sequence[GetIsPublicAddressRangesPublicAddressRangeTarget]
    (List) The target this public address range is bound to.If absent, this public address range is not bound to a target.
    accessTags List<String>
    cidr String
    (String) The public IPv4 range, expressed in CIDR format.
    createdAt String
    (String) The date and time that the public address range was created.
    crn String
    (String) The CRN for this VPC.
    href String
    (String) The URL for this zone.
    id String
    (String) The unique identifier for this VPC.
    ipv4AddressCount Number
    (Integer) The number of IPv4 addresses in this public address range.
    lifecycleState String
    (String) The lifecycle state of the public address range.
    name String
    (String) The globally unique name for this zone.
    resourceGroups List<Property Map>
    The ID of the Resource group this public gateway belongs to.
    resourceType String
    (String) The resource type.
    tags List<String>
    targets List<Property Map>
    (List) The target this public address range is bound to.If absent, this public address range is not bound to a target.

    GetIsPublicAddressRangesPublicAddressRangeResourceGroup

    Href string
    (String) The URL for this zone.
    Id string
    (String) The unique identifier for this VPC.
    Name string
    (String) The globally unique name for this zone.
    Href string
    (String) The URL for this zone.
    Id string
    (String) The unique identifier for this VPC.
    Name string
    (String) The globally unique name for this zone.
    href String
    (String) The URL for this zone.
    id String
    (String) The unique identifier for this VPC.
    name String
    (String) The globally unique name for this zone.
    href string
    (String) The URL for this zone.
    id string
    (String) The unique identifier for this VPC.
    name string
    (String) The globally unique name for this zone.
    href str
    (String) The URL for this zone.
    id str
    (String) The unique identifier for this VPC.
    name str
    (String) The globally unique name for this zone.
    href String
    (String) The URL for this zone.
    id String
    (String) The unique identifier for this VPC.
    name String
    (String) The globally unique name for this zone.

    GetIsPublicAddressRangesPublicAddressRangeTarget

    Vpcs List<GetIsPublicAddressRangesPublicAddressRangeTargetVpc>
    (List) The VPC this public address range is bound to.
    Zones List<GetIsPublicAddressRangesPublicAddressRangeTargetZone>
    (List) The zone this public address range resides in.
    Vpcs []GetIsPublicAddressRangesPublicAddressRangeTargetVpc
    (List) The VPC this public address range is bound to.
    Zones []GetIsPublicAddressRangesPublicAddressRangeTargetZone
    (List) The zone this public address range resides in.
    vpcs List<GetIsPublicAddressRangesPublicAddressRangeTargetVpc>
    (List) The VPC this public address range is bound to.
    zones List<GetIsPublicAddressRangesPublicAddressRangeTargetZone>
    (List) The zone this public address range resides in.
    vpcs GetIsPublicAddressRangesPublicAddressRangeTargetVpc[]
    (List) The VPC this public address range is bound to.
    zones GetIsPublicAddressRangesPublicAddressRangeTargetZone[]
    (List) The zone this public address range resides in.
    vpcs Sequence[GetIsPublicAddressRangesPublicAddressRangeTargetVpc]
    (List) The VPC this public address range is bound to.
    zones Sequence[GetIsPublicAddressRangesPublicAddressRangeTargetZone]
    (List) The zone this public address range resides in.
    vpcs List<Property Map>
    (List) The VPC this public address range is bound to.
    zones List<Property Map>
    (List) The zone this public address range resides in.

    GetIsPublicAddressRangesPublicAddressRangeTargetVpc

    Crn string
    (String) The CRN for this VPC.
    Deleteds List<GetIsPublicAddressRangesPublicAddressRangeTargetVpcDeleted>
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    Href string
    (String) The URL for this zone.
    Id string
    (String) The unique identifier for this VPC.
    Name string
    (String) The globally unique name for this zone.
    ResourceType string
    (String) The resource type.
    Crn string
    (String) The CRN for this VPC.
    Deleteds []GetIsPublicAddressRangesPublicAddressRangeTargetVpcDeleted
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    Href string
    (String) The URL for this zone.
    Id string
    (String) The unique identifier for this VPC.
    Name string
    (String) The globally unique name for this zone.
    ResourceType string
    (String) The resource type.
    crn String
    (String) The CRN for this VPC.
    deleteds List<GetIsPublicAddressRangesPublicAddressRangeTargetVpcDeleted>
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    href String
    (String) The URL for this zone.
    id String
    (String) The unique identifier for this VPC.
    name String
    (String) The globally unique name for this zone.
    resourceType String
    (String) The resource type.
    crn string
    (String) The CRN for this VPC.
    deleteds GetIsPublicAddressRangesPublicAddressRangeTargetVpcDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    href string
    (String) The URL for this zone.
    id string
    (String) The unique identifier for this VPC.
    name string
    (String) The globally unique name for this zone.
    resourceType string
    (String) The resource type.
    crn str
    (String) The CRN for this VPC.
    deleteds Sequence[GetIsPublicAddressRangesPublicAddressRangeTargetVpcDeleted]
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    href str
    (String) The URL for this zone.
    id str
    (String) The unique identifier for this VPC.
    name str
    (String) The globally unique name for this zone.
    resource_type str
    (String) The resource type.
    crn String
    (String) The CRN for this VPC.
    deleteds List<Property Map>
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    href String
    (String) The URL for this zone.
    id String
    (String) The unique identifier for this VPC.
    name String
    (String) The globally unique name for this zone.
    resourceType String
    (String) The resource type.

    GetIsPublicAddressRangesPublicAddressRangeTargetVpcDeleted

    MoreInfo string
    (String) Link to documentation about deleted resources.
    MoreInfo string
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.
    moreInfo string
    (String) Link to documentation about deleted resources.
    more_info str
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.

    GetIsPublicAddressRangesPublicAddressRangeTargetZone

    Href string
    (String) The URL for this zone.
    Name string
    (String) The globally unique name for this zone.
    Href string
    (String) The URL for this zone.
    Name string
    (String) The globally unique name for this zone.
    href String
    (String) The URL for this zone.
    name String
    (String) The globally unique name for this zone.
    href string
    (String) The URL for this zone.
    name string
    (String) The globally unique name for this zone.
    href str
    (String) The URL for this zone.
    name str
    (String) The globally unique name for this zone.
    href String
    (String) The URL for this zone.
    name String
    (String) The globally unique name for this zone.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud