1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsSubnetReservedIp
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getIsSubnetReservedIp

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Retrieve information of an existing reserved IP in a subnet as a read only data source. For more information, about associated reserved IP subnet, see binding and unbinding a reserved IP address.

    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 example = ibm.getIsSubnetReservedIp({
        subnet: ibm_is_subnet.example.id,
        reservedIp: ibm_is_subnet_reserved_ip.example.reserved_ip,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.get_is_subnet_reserved_ip(subnet=ibm_is_subnet["example"]["id"],
        reserved_ip=ibm_is_subnet_reserved_ip["example"]["reserved_ip"])
    
    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.LookupIsSubnetReservedIp(ctx, &ibm.LookupIsSubnetReservedIpArgs{
    			Subnet:     ibm_is_subnet.Example.Id,
    			ReservedIp: ibm_is_subnet_reserved_ip.Example.Reserved_ip,
    		}, 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 example = Ibm.GetIsSubnetReservedIp.Invoke(new()
        {
            Subnet = ibm_is_subnet.Example.Id,
            ReservedIp = ibm_is_subnet_reserved_ip.Example.Reserved_ip,
        });
    
    });
    
    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.GetIsSubnetReservedIpArgs;
    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 example = IbmFunctions.getIsSubnetReservedIp(GetIsSubnetReservedIpArgs.builder()
                .subnet(ibm_is_subnet.example().id())
                .reservedIp(ibm_is_subnet_reserved_ip.example().reserved_ip())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getIsSubnetReservedIp
          arguments:
            subnet: ${ibm_is_subnet.example.id}
            reservedIp: ${ibm_is_subnet_reserved_ip.example.reserved_ip}
    

    Using getIsSubnetReservedIp

    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 getIsSubnetReservedIp(args: GetIsSubnetReservedIpArgs, opts?: InvokeOptions): Promise<GetIsSubnetReservedIpResult>
    function getIsSubnetReservedIpOutput(args: GetIsSubnetReservedIpOutputArgs, opts?: InvokeOptions): Output<GetIsSubnetReservedIpResult>
    def get_is_subnet_reserved_ip(id: Optional[str] = None,
                                  reserved_ip: Optional[str] = None,
                                  subnet: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetIsSubnetReservedIpResult
    def get_is_subnet_reserved_ip_output(id: Optional[pulumi.Input[str]] = None,
                                  reserved_ip: Optional[pulumi.Input[str]] = None,
                                  subnet: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetIsSubnetReservedIpResult]
    func LookupIsSubnetReservedIp(ctx *Context, args *LookupIsSubnetReservedIpArgs, opts ...InvokeOption) (*LookupIsSubnetReservedIpResult, error)
    func LookupIsSubnetReservedIpOutput(ctx *Context, args *LookupIsSubnetReservedIpOutputArgs, opts ...InvokeOption) LookupIsSubnetReservedIpResultOutput

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

    public static class GetIsSubnetReservedIp 
    {
        public static Task<GetIsSubnetReservedIpResult> InvokeAsync(GetIsSubnetReservedIpArgs args, InvokeOptions? opts = null)
        public static Output<GetIsSubnetReservedIpResult> Invoke(GetIsSubnetReservedIpInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsSubnetReservedIpResult> getIsSubnetReservedIp(GetIsSubnetReservedIpArgs args, InvokeOptions options)
    public static Output<GetIsSubnetReservedIpResult> getIsSubnetReservedIp(GetIsSubnetReservedIpArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsSubnetReservedIp:getIsSubnetReservedIp
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ReservedIp string
    The ID for the reserved IP.
    Subnet string
    The ID for the subnet.
    Id string
    (String) The unique identifier for this endpoint gateway.
    ReservedIp string
    The ID for the reserved IP.
    Subnet string
    The ID for the subnet.
    Id string
    (String) The unique identifier for this endpoint gateway.
    reservedIp String
    The ID for the reserved IP.
    subnet String
    The ID for the subnet.
    id String
    (String) The unique identifier for this endpoint gateway.
    reservedIp string
    The ID for the reserved IP.
    subnet string
    The ID for the subnet.
    id string
    (String) The unique identifier for this endpoint gateway.
    reserved_ip str
    The ID for the reserved IP.
    subnet str
    The ID for the subnet.
    id str
    (String) The unique identifier for this endpoint gateway.
    reservedIp String
    The ID for the reserved IP.
    subnet String
    The ID for the subnet.
    id String
    (String) The unique identifier for this endpoint gateway.

    getIsSubnetReservedIp Result

    The following output properties are available:

    Address string
    AutoDelete bool
    (String) The auto_delete boolean for reserved IP.
    CreatedAt string
    (String) The creation timestamp for the reserved IP.
    Href string
    (String) The URL for this endpoint gateway.
    Id string
    (String) The unique identifier for this endpoint gateway.
    LifecycleState string
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    Name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    Owner string
    (String) The owner of the reserved IP.
    ReservedIp string
    (String) The ID for the reserved IP.
    ResourceType string
    (String) The resource type.
    Subnet string
    (String) The ID of the subnet for the reserved IP.
    Target string
    (String) The ID of the target for the reserved IP.
    TargetCrn string
    (String) The crn of the target for the reserved IP.
    TargetReferences List<GetIsSubnetReservedIpTargetReference>
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
    Address string
    AutoDelete bool
    (String) The auto_delete boolean for reserved IP.
    CreatedAt string
    (String) The creation timestamp for the reserved IP.
    Href string
    (String) The URL for this endpoint gateway.
    Id string
    (String) The unique identifier for this endpoint gateway.
    LifecycleState string
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    Name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    Owner string
    (String) The owner of the reserved IP.
    ReservedIp string
    (String) The ID for the reserved IP.
    ResourceType string
    (String) The resource type.
    Subnet string
    (String) The ID of the subnet for the reserved IP.
    Target string
    (String) The ID of the target for the reserved IP.
    TargetCrn string
    (String) The crn of the target for the reserved IP.
    TargetReferences []GetIsSubnetReservedIpTargetReference
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
    address String
    autoDelete Boolean
    (String) The auto_delete boolean for reserved IP.
    createdAt String
    (String) The creation timestamp for the reserved IP.
    href String
    (String) The URL for this endpoint gateway.
    id String
    (String) The unique identifier for this endpoint gateway.
    lifecycleState String
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    name String
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    owner String
    (String) The owner of the reserved IP.
    reservedIp String
    (String) The ID for the reserved IP.
    resourceType String
    (String) The resource type.
    subnet String
    (String) The ID of the subnet for the reserved IP.
    target String
    (String) The ID of the target for the reserved IP.
    targetCrn String
    (String) The crn of the target for the reserved IP.
    targetReferences List<GetIsSubnetReservedIpTargetReference>
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
    address string
    autoDelete boolean
    (String) The auto_delete boolean for reserved IP.
    createdAt string
    (String) The creation timestamp for the reserved IP.
    href string
    (String) The URL for this endpoint gateway.
    id string
    (String) The unique identifier for this endpoint gateway.
    lifecycleState string
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    owner string
    (String) The owner of the reserved IP.
    reservedIp string
    (String) The ID for the reserved IP.
    resourceType string
    (String) The resource type.
    subnet string
    (String) The ID of the subnet for the reserved IP.
    target string
    (String) The ID of the target for the reserved IP.
    targetCrn string
    (String) The crn of the target for the reserved IP.
    targetReferences GetIsSubnetReservedIpTargetReference[]
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
    address str
    auto_delete bool
    (String) The auto_delete boolean for reserved IP.
    created_at str
    (String) The creation timestamp for the reserved IP.
    href str
    (String) The URL for this endpoint gateway.
    id str
    (String) The unique identifier for this endpoint gateway.
    lifecycle_state str
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    name str
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    owner str
    (String) The owner of the reserved IP.
    reserved_ip str
    (String) The ID for the reserved IP.
    resource_type str
    (String) The resource type.
    subnet str
    (String) The ID of the subnet for the reserved IP.
    target str
    (String) The ID of the target for the reserved IP.
    target_crn str
    (String) The crn of the target for the reserved IP.
    target_references Sequence[GetIsSubnetReservedIpTargetReference]
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.
    address String
    autoDelete Boolean
    (String) The auto_delete boolean for reserved IP.
    createdAt String
    (String) The creation timestamp for the reserved IP.
    href String
    (String) The URL for this endpoint gateway.
    id String
    (String) The unique identifier for this endpoint gateway.
    lifecycleState String
    (String) The lifecycle state of the reserved IP. [ deleting, failed, pending, stable, suspended, updating, waiting ]
    name String
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    owner String
    (String) The owner of the reserved IP.
    reservedIp String
    (String) The ID for the reserved IP.
    resourceType String
    (String) The resource type.
    subnet String
    (String) The ID of the subnet for the reserved IP.
    target String
    (String) The ID of the target for the reserved IP.
    targetCrn String
    (String) The crn of the target for the reserved IP.
    targetReferences List<Property Map>
    (List) The target this reserved IP is bound to. If absent, this reserved IP is provider-owned or unbound.

    Supporting Types

    GetIsSubnetReservedIpTargetReference

    Crn string
    (String) The CRN for this endpoint gateway.
    Deleteds List<GetIsSubnetReservedIpTargetReferenceDeleted>
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    Href string
    (String) The URL for this endpoint gateway.
    Id string
    (String) The unique identifier for this endpoint gateway.
    Name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    ResourceType string
    (String) The resource type.
    Crn string
    (String) The CRN for this endpoint gateway.
    Deleteds []GetIsSubnetReservedIpTargetReferenceDeleted
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    Href string
    (String) The URL for this endpoint gateway.
    Id string
    (String) The unique identifier for this endpoint gateway.
    Name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    ResourceType string
    (String) The resource type.
    crn String
    (String) The CRN for this endpoint gateway.
    deleteds List<GetIsSubnetReservedIpTargetReferenceDeleted>
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    href String
    (String) The URL for this endpoint gateway.
    id String
    (String) The unique identifier for this endpoint gateway.
    name String
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    resourceType String
    (String) The resource type.
    crn string
    (String) The CRN for this endpoint gateway.
    deleteds GetIsSubnetReservedIpTargetReferenceDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    href string
    (String) The URL for this endpoint gateway.
    id string
    (String) The unique identifier for this endpoint gateway.
    name string
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    resourceType string
    (String) The resource type.
    crn str
    (String) The CRN for this endpoint gateway.
    deleteds Sequence[GetIsSubnetReservedIpTargetReferenceDeleted]
    (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information.
    href str
    (String) The URL for this endpoint gateway.
    id str
    (String) The unique identifier for this endpoint gateway.
    name str
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    resource_type str
    (String) The resource type.
    crn String
    (String) The CRN for this endpoint gateway.
    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 endpoint gateway.
    id String
    (String) The unique identifier for this endpoint gateway.
    name String
    (String) The name for this endpoint gateway. The name is unique across all endpoint gateways in the VPC.
    resourceType String
    (String) The resource type.

    GetIsSubnetReservedIpTargetReferenceDeleted

    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.

    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.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud