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

ibm.getIsClusterNetworkSubnets

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 ClusterNetworkSubnetCollection. 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 isClusterNetworkSubnetsInstance = ibm.getIsClusterNetworkSubnets({
        clusterNetworkId: ibm_is_cluster_network.is_cluster_network_instance.id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    is_cluster_network_subnets_instance = ibm.get_is_cluster_network_subnets(cluster_network_id=ibm_is_cluster_network["is_cluster_network_instance"]["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.GetIsClusterNetworkSubnets(ctx, &ibm.GetIsClusterNetworkSubnetsArgs{
    			ClusterNetworkId: ibm_is_cluster_network.Is_cluster_network_instance.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 isClusterNetworkSubnetsInstance = Ibm.GetIsClusterNetworkSubnets.Invoke(new()
        {
            ClusterNetworkId = ibm_is_cluster_network.Is_cluster_network_instance.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.GetIsClusterNetworkSubnetsArgs;
    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 isClusterNetworkSubnetsInstance = IbmFunctions.getIsClusterNetworkSubnets(GetIsClusterNetworkSubnetsArgs.builder()
                .clusterNetworkId(ibm_is_cluster_network.is_cluster_network_instance().id())
                .build());
    
        }
    }
    
    variables:
      isClusterNetworkSubnetsInstance:
        fn::invoke:
          function: ibm:getIsClusterNetworkSubnets
          arguments:
            clusterNetworkId: ${ibm_is_cluster_network.is_cluster_network_instance.id}
    

    Using getIsClusterNetworkSubnets

    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 getIsClusterNetworkSubnets(args: GetIsClusterNetworkSubnetsArgs, opts?: InvokeOptions): Promise<GetIsClusterNetworkSubnetsResult>
    function getIsClusterNetworkSubnetsOutput(args: GetIsClusterNetworkSubnetsOutputArgs, opts?: InvokeOptions): Output<GetIsClusterNetworkSubnetsResult>
    def get_is_cluster_network_subnets(cluster_network_id: Optional[str] = None,
                                       id: Optional[str] = None,
                                       name: Optional[str] = None,
                                       sort: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetIsClusterNetworkSubnetsResult
    def get_is_cluster_network_subnets_output(cluster_network_id: Optional[pulumi.Input[str]] = None,
                                       id: Optional[pulumi.Input[str]] = None,
                                       name: Optional[pulumi.Input[str]] = None,
                                       sort: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetIsClusterNetworkSubnetsResult]
    func GetIsClusterNetworkSubnets(ctx *Context, args *GetIsClusterNetworkSubnetsArgs, opts ...InvokeOption) (*GetIsClusterNetworkSubnetsResult, error)
    func GetIsClusterNetworkSubnetsOutput(ctx *Context, args *GetIsClusterNetworkSubnetsOutputArgs, opts ...InvokeOption) GetIsClusterNetworkSubnetsResultOutput

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

    public static class GetIsClusterNetworkSubnets 
    {
        public static Task<GetIsClusterNetworkSubnetsResult> InvokeAsync(GetIsClusterNetworkSubnetsArgs args, InvokeOptions? opts = null)
        public static Output<GetIsClusterNetworkSubnetsResult> Invoke(GetIsClusterNetworkSubnetsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsClusterNetworkSubnetsResult> getIsClusterNetworkSubnets(GetIsClusterNetworkSubnetsArgs args, InvokeOptions options)
    public static Output<GetIsClusterNetworkSubnetsResult> getIsClusterNetworkSubnets(GetIsClusterNetworkSubnetsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsClusterNetworkSubnets:getIsClusterNetworkSubnets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterNetworkId string
    The cluster network identifier.
    Id string
    (String) The unique identifier for this cluster network subnet.
    Name string
    Filters the collection to resources with a name property matching the exact specified name.
    Sort string
    Sorts the returned collection by the specified property name in ascending order. A - may be prepended to the name to sort in descending order. For example, the value -created_at sorts the collection by the created_at property in descending order, and the value name sorts it by the name property in ascending order.
    ClusterNetworkId string
    The cluster network identifier.
    Id string
    (String) The unique identifier for this cluster network subnet.
    Name string
    Filters the collection to resources with a name property matching the exact specified name.
    Sort string
    Sorts the returned collection by the specified property name in ascending order. A - may be prepended to the name to sort in descending order. For example, the value -created_at sorts the collection by the created_at property in descending order, and the value name sorts it by the name property in ascending order.
    clusterNetworkId String
    The cluster network identifier.
    id String
    (String) The unique identifier for this cluster network subnet.
    name String
    Filters the collection to resources with a name property matching the exact specified name.
    sort String
    Sorts the returned collection by the specified property name in ascending order. A - may be prepended to the name to sort in descending order. For example, the value -created_at sorts the collection by the created_at property in descending order, and the value name sorts it by the name property in ascending order.
    clusterNetworkId string
    The cluster network identifier.
    id string
    (String) The unique identifier for this cluster network subnet.
    name string
    Filters the collection to resources with a name property matching the exact specified name.
    sort string
    Sorts the returned collection by the specified property name in ascending order. A - may be prepended to the name to sort in descending order. For example, the value -created_at sorts the collection by the created_at property in descending order, and the value name sorts it by the name property in ascending order.
    cluster_network_id str
    The cluster network identifier.
    id str
    (String) The unique identifier for this cluster network subnet.
    name str
    Filters the collection to resources with a name property matching the exact specified name.
    sort str
    Sorts the returned collection by the specified property name in ascending order. A - may be prepended to the name to sort in descending order. For example, the value -created_at sorts the collection by the created_at property in descending order, and the value name sorts it by the name property in ascending order.
    clusterNetworkId String
    The cluster network identifier.
    id String
    (String) The unique identifier for this cluster network subnet.
    name String
    Filters the collection to resources with a name property matching the exact specified name.
    sort String
    Sorts the returned collection by the specified property name in ascending order. A - may be prepended to the name to sort in descending order. For example, the value -created_at sorts the collection by the created_at property in descending order, and the value name sorts it by the name property in ascending order.

    getIsClusterNetworkSubnets Result

    The following output properties are available:

    ClusterNetworkId string
    Id string
    (String) The unique identifier for this cluster network subnet.
    Subnets List<GetIsClusterNetworkSubnetsSubnet>
    (List) A page of subnets for the cluster network.
    Name string
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    Sort string
    ClusterNetworkId string
    Id string
    (String) The unique identifier for this cluster network subnet.
    Subnets []GetIsClusterNetworkSubnetsSubnet
    (List) A page of subnets for the cluster network.
    Name string
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    Sort string
    clusterNetworkId String
    id String
    (String) The unique identifier for this cluster network subnet.
    subnets List<GetIsClusterNetworkSubnetsSubnet>
    (List) A page of subnets for the cluster network.
    name String
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    sort String
    clusterNetworkId string
    id string
    (String) The unique identifier for this cluster network subnet.
    subnets GetIsClusterNetworkSubnetsSubnet[]
    (List) A page of subnets for the cluster network.
    name string
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    sort string
    cluster_network_id str
    id str
    (String) The unique identifier for this cluster network subnet.
    subnets Sequence[GetIsClusterNetworkSubnetsSubnet]
    (List) A page of subnets for the cluster network.
    name str
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    sort str
    clusterNetworkId String
    id String
    (String) The unique identifier for this cluster network subnet.
    subnets List<Property Map>
    (List) A page of subnets for the cluster network.
    name String
    (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network.
    sort String

    Supporting Types

    GetIsClusterNetworkSubnetsSubnet

    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.
    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
    (String) The unique identifier for this cluster network subnet.
    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<GetIsClusterNetworkSubnetsSubnetLifecycleReason>
    (List) The reasons for the current lifecycle_state (if any). Nested schema for lifecycle_reasons:
    LifecycleState string
    (String) The lifecycle state of the cluster network subnet.
    Name string
    Filters the collection to resources with a name property matching the exact specified name.
    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.
    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
    (String) The unique identifier for this cluster network subnet.
    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 []GetIsClusterNetworkSubnetsSubnetLifecycleReason
    (List) The reasons for the current lifecycle_state (if any). Nested schema for lifecycle_reasons:
    LifecycleState string
    (String) The lifecycle state of the cluster network subnet.
    Name string
    Filters the collection to resources with a name property matching the exact specified name.
    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.
    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
    (String) The unique identifier for this cluster network subnet.
    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<GetIsClusterNetworkSubnetsSubnetLifecycleReason>
    (List) The reasons for the current lifecycle_state (if any). Nested schema for lifecycle_reasons:
    lifecycleState String
    (String) The lifecycle state of the cluster network subnet.
    name String
    Filters the collection to resources with a name property matching the exact specified name.
    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.
    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
    (String) The unique identifier for this cluster network subnet.
    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 GetIsClusterNetworkSubnetsSubnetLifecycleReason[]
    (List) The reasons for the current lifecycle_state (if any). Nested schema for lifecycle_reasons:
    lifecycleState string
    (String) The lifecycle state of the cluster network subnet.
    name string
    Filters the collection to resources with a name property matching the exact specified name.
    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.
    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
    (String) The unique identifier for this cluster network subnet.
    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[GetIsClusterNetworkSubnetsSubnetLifecycleReason]
    (List) The reasons for the current lifecycle_state (if any). Nested schema for lifecycle_reasons:
    lifecycle_state str
    (String) The lifecycle state of the cluster network subnet.
    name str
    Filters the collection to resources with a name property matching the exact specified name.
    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.
    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
    (String) The unique identifier for this cluster network subnet.
    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). Nested schema for lifecycle_reasons:
    lifecycleState String
    (String) The lifecycle state of the cluster network subnet.
    name String
    Filters the collection to resources with a name property matching the exact specified name.
    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.

    GetIsClusterNetworkSubnetsSubnetLifecycleReason

    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