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

ibm.getIsClusterNetworkSubnet

Explore with Pulumi AI

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

    Provides a read-only data source to retrieve information about a ClusterNetworkSubnet. You can then reference the fields of the data source in other resources within the same configuration by using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const isClusterNetworkSubnetInstance = ibm.getIsClusterNetworkSubnet({
        clusterNetworkId: ibm_is_cluster_network.is_cluster_network_instance.id,
        clusterNetworkSubnetId: ibm_is_cluster_network_subnet.is_cluster_network_subnet_instance.cluster_network_subnet_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    is_cluster_network_subnet_instance = ibm.get_is_cluster_network_subnet(cluster_network_id=ibm_is_cluster_network["is_cluster_network_instance"]["id"],
        cluster_network_subnet_id=ibm_is_cluster_network_subnet["is_cluster_network_subnet_instance"]["cluster_network_subnet_id"])
    
    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.LookupIsClusterNetworkSubnet(ctx, &ibm.LookupIsClusterNetworkSubnetArgs{
    			ClusterNetworkId:       ibm_is_cluster_network.Is_cluster_network_instance.Id,
    			ClusterNetworkSubnetId: ibm_is_cluster_network_subnet.Is_cluster_network_subnet_instance.Cluster_network_subnet_id,
    		}, 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 isClusterNetworkSubnetInstance = Ibm.GetIsClusterNetworkSubnet.Invoke(new()
        {
            ClusterNetworkId = ibm_is_cluster_network.Is_cluster_network_instance.Id,
            ClusterNetworkSubnetId = ibm_is_cluster_network_subnet.Is_cluster_network_subnet_instance.Cluster_network_subnet_id,
        });
    
    });
    
    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.GetIsClusterNetworkSubnetArgs;
    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 isClusterNetworkSubnetInstance = IbmFunctions.getIsClusterNetworkSubnet(GetIsClusterNetworkSubnetArgs.builder()
                .clusterNetworkId(ibm_is_cluster_network.is_cluster_network_instance().id())
                .clusterNetworkSubnetId(ibm_is_cluster_network_subnet.is_cluster_network_subnet_instance().cluster_network_subnet_id())
                .build());
    
        }
    }
    
    variables:
      isClusterNetworkSubnetInstance:
        fn::invoke:
          function: ibm:getIsClusterNetworkSubnet
          arguments:
            clusterNetworkId: ${ibm_is_cluster_network.is_cluster_network_instance.id}
            clusterNetworkSubnetId: ${ibm_is_cluster_network_subnet.is_cluster_network_subnet_instance.cluster_network_subnet_id}
    

    Using getIsClusterNetworkSubnet

    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 getIsClusterNetworkSubnet(args: GetIsClusterNetworkSubnetArgs, opts?: InvokeOptions): Promise<GetIsClusterNetworkSubnetResult>
    function getIsClusterNetworkSubnetOutput(args: GetIsClusterNetworkSubnetOutputArgs, opts?: InvokeOptions): Output<GetIsClusterNetworkSubnetResult>
    def get_is_cluster_network_subnet(cluster_network_id: Optional[str] = None,
                                      cluster_network_subnet_id: Optional[str] = None,
                                      id: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetIsClusterNetworkSubnetResult
    def get_is_cluster_network_subnet_output(cluster_network_id: Optional[pulumi.Input[str]] = None,
                                      cluster_network_subnet_id: Optional[pulumi.Input[str]] = None,
                                      id: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetIsClusterNetworkSubnetResult]
    func LookupIsClusterNetworkSubnet(ctx *Context, args *LookupIsClusterNetworkSubnetArgs, opts ...InvokeOption) (*LookupIsClusterNetworkSubnetResult, error)
    func LookupIsClusterNetworkSubnetOutput(ctx *Context, args *LookupIsClusterNetworkSubnetOutputArgs, opts ...InvokeOption) LookupIsClusterNetworkSubnetResultOutput

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

    public static class GetIsClusterNetworkSubnet 
    {
        public static Task<GetIsClusterNetworkSubnetResult> InvokeAsync(GetIsClusterNetworkSubnetArgs args, InvokeOptions? opts = null)
        public static Output<GetIsClusterNetworkSubnetResult> Invoke(GetIsClusterNetworkSubnetInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsClusterNetworkSubnetResult> getIsClusterNetworkSubnet(GetIsClusterNetworkSubnetArgs args, InvokeOptions options)
    public static Output<GetIsClusterNetworkSubnetResult> getIsClusterNetworkSubnet(GetIsClusterNetworkSubnetArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsClusterNetworkSubnet:getIsClusterNetworkSubnet
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterNetworkId string
    The cluster network identifier.
    ClusterNetworkSubnetId string
    The cluster network subnet identifier.
    Id string
    The unique identifier of the ClusterNetworkSubnet.
    ClusterNetworkId string
    The cluster network identifier.
    ClusterNetworkSubnetId string
    The cluster network subnet identifier.
    Id string
    The unique identifier of the ClusterNetworkSubnet.
    clusterNetworkId String
    The cluster network identifier.
    clusterNetworkSubnetId String
    The cluster network subnet identifier.
    id String
    The unique identifier of the ClusterNetworkSubnet.
    clusterNetworkId string
    The cluster network identifier.
    clusterNetworkSubnetId string
    The cluster network subnet identifier.
    id string
    The unique identifier of the ClusterNetworkSubnet.
    cluster_network_id str
    The cluster network identifier.
    cluster_network_subnet_id str
    The cluster network subnet identifier.
    id str
    The unique identifier of the ClusterNetworkSubnet.
    clusterNetworkId String
    The cluster network identifier.
    clusterNetworkSubnetId String
    The cluster network subnet identifier.
    id String
    The unique identifier of the ClusterNetworkSubnet.

    getIsClusterNetworkSubnet Result

    The following output properties are available:

    AvailableIpv4AddressCount double
    (Integer) The number of IPv4 addresses in this cluster network subnet that are not in use, and have not been reserved by the user or the provider.
    ClusterNetworkId string
    ClusterNetworkSubnetId string
    CreatedAt string
    (String) The date and time that the cluster network subnet was created.
    Href string
    (String) The URL for this cluster network subnet.
    Id string
    The unique identifier of the ClusterNetworkSubnet.
    IpVersion string
    (String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
    Ipv4CidrBlock string
    (String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
    LifecycleReasons List<GetIsClusterNetworkSubnetLifecycleReason>
    (List) The reasons for the current lifecycle_state (if any).
    LifecycleState string
    (String) The lifecycle state of the cluster network subnet.
    Name string
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    ResourceType string
    (String) The resource type.
    TotalIpv4AddressCount double
    (Integer) The total number of IPv4 addresses in this cluster network subnet.Note: This is calculated as 2(32 - prefix length). For example, the prefix length /24 gives: 2(32 - 24) = 28 = 256 addresses.
    AvailableIpv4AddressCount float64
    (Integer) The number of IPv4 addresses in this cluster network subnet that are not in use, and have not been reserved by the user or the provider.
    ClusterNetworkId string
    ClusterNetworkSubnetId string
    CreatedAt string
    (String) The date and time that the cluster network subnet was created.
    Href string
    (String) The URL for this cluster network subnet.
    Id string
    The unique identifier of the ClusterNetworkSubnet.
    IpVersion string
    (String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
    Ipv4CidrBlock string
    (String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
    LifecycleReasons []GetIsClusterNetworkSubnetLifecycleReason
    (List) The reasons for the current lifecycle_state (if any).
    LifecycleState string
    (String) The lifecycle state of the cluster network subnet.
    Name string
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    ResourceType string
    (String) The resource type.
    TotalIpv4AddressCount float64
    (Integer) The total number of IPv4 addresses in this cluster network subnet.Note: This is calculated as 2(32 - prefix length). For example, the prefix length /24 gives: 2(32 - 24) = 28 = 256 addresses.
    availableIpv4AddressCount Double
    (Integer) The number of IPv4 addresses in this cluster network subnet that are not in use, and have not been reserved by the user or the provider.
    clusterNetworkId String
    clusterNetworkSubnetId String
    createdAt String
    (String) The date and time that the cluster network subnet was created.
    href String
    (String) The URL for this cluster network subnet.
    id String
    The unique identifier of the ClusterNetworkSubnet.
    ipVersion String
    (String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
    ipv4CidrBlock String
    (String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
    lifecycleReasons List<GetIsClusterNetworkSubnetLifecycleReason>
    (List) The reasons for the current lifecycle_state (if any).
    lifecycleState String
    (String) The lifecycle state of the cluster network subnet.
    name String
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    resourceType String
    (String) The resource type.
    totalIpv4AddressCount Double
    (Integer) The total number of IPv4 addresses in this cluster network subnet.Note: This is calculated as 2(32 - prefix length). For example, the prefix length /24 gives: 2(32 - 24) = 28 = 256 addresses.
    availableIpv4AddressCount number
    (Integer) The number of IPv4 addresses in this cluster network subnet that are not in use, and have not been reserved by the user or the provider.
    clusterNetworkId string
    clusterNetworkSubnetId string
    createdAt string
    (String) The date and time that the cluster network subnet was created.
    href string
    (String) The URL for this cluster network subnet.
    id string
    The unique identifier of the ClusterNetworkSubnet.
    ipVersion string
    (String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
    ipv4CidrBlock string
    (String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
    lifecycleReasons GetIsClusterNetworkSubnetLifecycleReason[]
    (List) The reasons for the current lifecycle_state (if any).
    lifecycleState string
    (String) The lifecycle state of the cluster network subnet.
    name string
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    resourceType string
    (String) The resource type.
    totalIpv4AddressCount number
    (Integer) The total number of IPv4 addresses in this cluster network subnet.Note: This is calculated as 2(32 - prefix length). For example, the prefix length /24 gives: 2(32 - 24) = 28 = 256 addresses.
    available_ipv4_address_count float
    (Integer) The number of IPv4 addresses in this cluster network subnet that are not in use, and have not been reserved by the user or the provider.
    cluster_network_id str
    cluster_network_subnet_id str
    created_at str
    (String) The date and time that the cluster network subnet was created.
    href str
    (String) The URL for this cluster network subnet.
    id str
    The unique identifier of the ClusterNetworkSubnet.
    ip_version str
    (String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
    ipv4_cidr_block str
    (String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
    lifecycle_reasons Sequence[GetIsClusterNetworkSubnetLifecycleReason]
    (List) The reasons for the current lifecycle_state (if any).
    lifecycle_state str
    (String) The lifecycle state of the cluster network subnet.
    name str
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    resource_type str
    (String) The resource type.
    total_ipv4_address_count float
    (Integer) The total number of IPv4 addresses in this cluster network subnet.Note: This is calculated as 2(32 - prefix length). For example, the prefix length /24 gives: 2(32 - 24) = 28 = 256 addresses.
    availableIpv4AddressCount Number
    (Integer) The number of IPv4 addresses in this cluster network subnet that are not in use, and have not been reserved by the user or the provider.
    clusterNetworkId String
    clusterNetworkSubnetId String
    createdAt String
    (String) The date and time that the cluster network subnet was created.
    href String
    (String) The URL for this cluster network subnet.
    id String
    The unique identifier of the ClusterNetworkSubnet.
    ipVersion String
    (String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
    ipv4CidrBlock String
    (String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
    lifecycleReasons List<Property Map>
    (List) The reasons for the current lifecycle_state (if any).
    lifecycleState String
    (String) The lifecycle state of the cluster network subnet.
    name String
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    resourceType String
    (String) The resource type.
    totalIpv4AddressCount Number
    (Integer) The total number of IPv4 addresses in this cluster network subnet.Note: This is calculated as 2(32 - prefix length). For example, the prefix length /24 gives: 2(32 - 24) = 28 = 256 addresses.

    Supporting Types

    GetIsClusterNetworkSubnetLifecycleReason

    Code string
    (String) A reason code for this lifecycle state:- internal_error: internal error (contact IBM support)- resource_suspended_by_provider: The resource has been suspended (contact IBM support)The enumerated values for this property mayexpand in the future.
    Message string
    (String) An explanation of the reason for this lifecycle state.
    MoreInfo string
    (String) Link to documentation about the reason for this lifecycle state.
    Code string
    (String) A reason code for this lifecycle state:- internal_error: internal error (contact IBM support)- resource_suspended_by_provider: The resource has been suspended (contact IBM support)The enumerated values for this property mayexpand in the future.
    Message string
    (String) An explanation of the reason for this lifecycle state.
    MoreInfo string
    (String) Link to documentation about the reason for this lifecycle state.
    code String
    (String) A reason code for this lifecycle state:- internal_error: internal error (contact IBM support)- resource_suspended_by_provider: The resource has been suspended (contact IBM support)The enumerated values for this property mayexpand in the future.
    message String
    (String) An explanation of the reason for this lifecycle state.
    moreInfo String
    (String) Link to documentation about the reason for this lifecycle state.
    code string
    (String) A reason code for this lifecycle state:- internal_error: internal error (contact IBM support)- resource_suspended_by_provider: The resource has been suspended (contact IBM support)The enumerated values for this property mayexpand in the future.
    message string
    (String) An explanation of the reason for this lifecycle state.
    moreInfo string
    (String) Link to documentation about the reason for this lifecycle state.
    code str
    (String) A reason code for this lifecycle state:- internal_error: internal error (contact IBM support)- resource_suspended_by_provider: The resource has been suspended (contact IBM support)The enumerated values for this property mayexpand in the future.
    message str
    (String) An explanation of the reason for this lifecycle state.
    more_info str
    (String) Link to documentation about the reason for this lifecycle state.
    code String
    (String) A reason code for this lifecycle state:- internal_error: internal error (contact IBM support)- resource_suspended_by_provider: The resource has been suspended (contact IBM support)The enumerated values for this property mayexpand in the future.
    message String
    (String) An explanation of the reason for this lifecycle state.
    moreInfo String
    (String) Link to documentation about the reason for this lifecycle state.

    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