1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsClusterNetworkSubnets
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getIsClusterNetworkSubnets

Explore with Pulumi AI

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,
});
Copy
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"])
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  isClusterNetworkSubnetsInstance:
    fn::invoke:
      function: ibm:getIsClusterNetworkSubnets
      arguments:
        clusterNetworkId: ${ibm_is_cluster_network.is_cluster_network_instance.id}
Copy

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>
Copy
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]
Copy
func GetIsClusterNetworkSubnets(ctx *Context, args *GetIsClusterNetworkSubnetsArgs, opts ...InvokeOption) (*GetIsClusterNetworkSubnetsResult, error)
func GetIsClusterNetworkSubnetsOutput(ctx *Context, args *GetIsClusterNetworkSubnetsOutputArgs, opts ...InvokeOption) GetIsClusterNetworkSubnetsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetIsClusterNetworkSubnetsResult> getIsClusterNetworkSubnets(GetIsClusterNetworkSubnetsArgs args, InvokeOptions options)
public static Output<GetIsClusterNetworkSubnetsResult> getIsClusterNetworkSubnets(GetIsClusterNetworkSubnetsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getIsClusterNetworkSubnets:getIsClusterNetworkSubnets
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterNetworkId This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. string
(String) The date and time that the cluster network subnet was created.
Href This property is required. string
(String) The URL for this cluster network subnet.
Id This property is required. string
(String) The unique identifier for this cluster network subnet.
IpVersion This property is required. string
(String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
Ipv4CidrBlock This property is required. string
(String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
LifecycleReasons This property is required. List<GetIsClusterNetworkSubnetsSubnetLifecycleReason>
(List) The reasons for the current lifecycle_state (if any). Nested schema for lifecycle_reasons:
LifecycleState This property is required. string
(String) The lifecycle state of the cluster network subnet.
Name This property is required. string
Filters the collection to resources with a name property matching the exact specified name.
ResourceType This property is required. string
(String) The resource type.
TotalIpv4AddressCount This property is required. 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 This property is required. 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 This property is required. string
(String) The date and time that the cluster network subnet was created.
Href This property is required. string
(String) The URL for this cluster network subnet.
Id This property is required. string
(String) The unique identifier for this cluster network subnet.
IpVersion This property is required. string
(String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
Ipv4CidrBlock This property is required. string
(String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
LifecycleReasons This property is required. []GetIsClusterNetworkSubnetsSubnetLifecycleReason
(List) The reasons for the current lifecycle_state (if any). Nested schema for lifecycle_reasons:
LifecycleState This property is required. string
(String) The lifecycle state of the cluster network subnet.
Name This property is required. string
Filters the collection to resources with a name property matching the exact specified name.
ResourceType This property is required. string
(String) The resource type.
TotalIpv4AddressCount This property is required. 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 This property is required. 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 This property is required. String
(String) The date and time that the cluster network subnet was created.
href This property is required. String
(String) The URL for this cluster network subnet.
id This property is required. String
(String) The unique identifier for this cluster network subnet.
ipVersion This property is required. String
(String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
ipv4CidrBlock This property is required. String
(String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
lifecycleReasons This property is required. List<GetIsClusterNetworkSubnetsSubnetLifecycleReason>
(List) The reasons for the current lifecycle_state (if any). Nested schema for lifecycle_reasons:
lifecycleState This property is required. String
(String) The lifecycle state of the cluster network subnet.
name This property is required. String
Filters the collection to resources with a name property matching the exact specified name.
resourceType This property is required. String
(String) The resource type.
totalIpv4AddressCount This property is required. 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 This property is required. 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 This property is required. string
(String) The date and time that the cluster network subnet was created.
href This property is required. string
(String) The URL for this cluster network subnet.
id This property is required. string
(String) The unique identifier for this cluster network subnet.
ipVersion This property is required. string
(String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
ipv4CidrBlock This property is required. string
(String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
lifecycleReasons This property is required. GetIsClusterNetworkSubnetsSubnetLifecycleReason[]
(List) The reasons for the current lifecycle_state (if any). Nested schema for lifecycle_reasons:
lifecycleState This property is required. string
(String) The lifecycle state of the cluster network subnet.
name This property is required. string
Filters the collection to resources with a name property matching the exact specified name.
resourceType This property is required. string
(String) The resource type.
totalIpv4AddressCount This property is required. 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 This property is required. 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 This property is required. str
(String) The date and time that the cluster network subnet was created.
href This property is required. str
(String) The URL for this cluster network subnet.
id This property is required. str
(String) The unique identifier for this cluster network subnet.
ip_version This property is required. str
(String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
ipv4_cidr_block This property is required. str
(String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
lifecycle_reasons This property is required. Sequence[GetIsClusterNetworkSubnetsSubnetLifecycleReason]
(List) The reasons for the current lifecycle_state (if any). Nested schema for lifecycle_reasons:
lifecycle_state This property is required. str
(String) The lifecycle state of the cluster network subnet.
name This property is required. str
Filters the collection to resources with a name property matching the exact specified name.
resource_type This property is required. str
(String) The resource type.
total_ipv4_address_count This property is required. 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 This property is required. 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 This property is required. String
(String) The date and time that the cluster network subnet was created.
href This property is required. String
(String) The URL for this cluster network subnet.
id This property is required. String
(String) The unique identifier for this cluster network subnet.
ipVersion This property is required. String
(String) The IP version for this cluster network subnet.The enumerated values for this property mayexpand in the future.
ipv4CidrBlock This property is required. String
(String) The IPv4 range of this cluster network subnet, expressed in CIDR format.
lifecycleReasons This property is required. List<Property Map>
(List) The reasons for the current lifecycle_state (if any). Nested schema for lifecycle_reasons:
lifecycleState This property is required. String
(String) The lifecycle state of the cluster network subnet.
name This property is required. String
Filters the collection to resources with a name property matching the exact specified name.
resourceType This property is required. String
(String) The resource type.
totalIpv4AddressCount This property is required. 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 This property is required. 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 This property is required. string
(String) An explanation of the reason for this lifecycle state.
MoreInfo This property is required. string
(String) Link to documentation about the reason for this lifecycle state.
Code This property is required. 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 This property is required. string
(String) An explanation of the reason for this lifecycle state.
MoreInfo This property is required. string
(String) Link to documentation about the reason for this lifecycle state.
code This property is required. 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 This property is required. String
(String) An explanation of the reason for this lifecycle state.
moreInfo This property is required. String
(String) Link to documentation about the reason for this lifecycle state.
code This property is required. 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 This property is required. string
(String) An explanation of the reason for this lifecycle state.
moreInfo This property is required. string
(String) Link to documentation about the reason for this lifecycle state.
code This property is required. 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 This property is required. str
(String) An explanation of the reason for this lifecycle state.
more_info This property is required. str
(String) Link to documentation about the reason for this lifecycle state.
code This property is required. 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 This property is required. String
(String) An explanation of the reason for this lifecycle state.
moreInfo This property is required. 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.