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

ibm.getIsSubnet

Explore with Pulumi AI

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

    Retrieve information of an existing VPC Generation 2 compute subnet as a read only data source. For more information, about the IBM Cloud subnet, see attaching subnets to a routing table.

    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) {
        }
    }
    
    {}
    

    Using getIsSubnet

    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 getIsSubnet(args: GetIsSubnetArgs, opts?: InvokeOptions): Promise<GetIsSubnetResult>
    function getIsSubnetOutput(args: GetIsSubnetOutputArgs, opts?: InvokeOptions): Output<GetIsSubnetResult>
    def get_is_subnet(id: Optional[str] = None,
                      identifier: Optional[str] = None,
                      name: Optional[str] = None,
                      vpc: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetIsSubnetResult
    def get_is_subnet_output(id: Optional[pulumi.Input[str]] = None,
                      identifier: Optional[pulumi.Input[str]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      vpc: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetIsSubnetResult]
    func LookupIsSubnet(ctx *Context, args *LookupIsSubnetArgs, opts ...InvokeOption) (*LookupIsSubnetResult, error)
    func LookupIsSubnetOutput(ctx *Context, args *LookupIsSubnetOutputArgs, opts ...InvokeOption) LookupIsSubnetResultOutput

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

    public static class GetIsSubnet 
    {
        public static Task<GetIsSubnetResult> InvokeAsync(GetIsSubnetArgs args, InvokeOptions? opts = null)
        public static Output<GetIsSubnetResult> Invoke(GetIsSubnetInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsSubnetResult> getIsSubnet(GetIsSubnetArgs args, InvokeOptions options)
    public static Output<GetIsSubnetResult> getIsSubnet(GetIsSubnetArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsSubnet:getIsSubnet
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    (String) The unique identifier for this routing table.
    Identifier string
    The ID of the subnet,name and identifier are mutually exclusive.
    Name string
    The name of the subnet,name and identifier are mutually exclusive.
    Vpc string
    Filters the collection to resources with a vpc property matching the specified identifier. Subnet name must be specified with vpc filter.
    Id string
    (String) The unique identifier for this routing table.
    Identifier string
    The ID of the subnet,name and identifier are mutually exclusive.
    Name string
    The name of the subnet,name and identifier are mutually exclusive.
    Vpc string
    Filters the collection to resources with a vpc property matching the specified identifier. Subnet name must be specified with vpc filter.
    id String
    (String) The unique identifier for this routing table.
    identifier String
    The ID of the subnet,name and identifier are mutually exclusive.
    name String
    The name of the subnet,name and identifier are mutually exclusive.
    vpc String
    Filters the collection to resources with a vpc property matching the specified identifier. Subnet name must be specified with vpc filter.
    id string
    (String) The unique identifier for this routing table.
    identifier string
    The ID of the subnet,name and identifier are mutually exclusive.
    name string
    The name of the subnet,name and identifier are mutually exclusive.
    vpc string
    Filters the collection to resources with a vpc property matching the specified identifier. Subnet name must be specified with vpc filter.
    id str
    (String) The unique identifier for this routing table.
    identifier str
    The ID of the subnet,name and identifier are mutually exclusive.
    name str
    The name of the subnet,name and identifier are mutually exclusive.
    vpc str
    Filters the collection to resources with a vpc property matching the specified identifier. Subnet name must be specified with vpc filter.
    id String
    (String) The unique identifier for this routing table.
    identifier String
    The ID of the subnet,name and identifier are mutually exclusive.
    name String
    The name of the subnet,name and identifier are mutually exclusive.
    vpc String
    Filters the collection to resources with a vpc property matching the specified identifier. Subnet name must be specified with vpc filter.

    getIsSubnet Result

    The following output properties are available:

    AccessTags List<string>
    (String) Access management tags associated for the instance.
    AvailableIpv4AddressCount double
    (Integer) The total number of available IPv4 addresses.
    Crn string
    (String) The crn for this routing table.
    Id string
    (String) The unique identifier for this routing table.
    Ipv4CidrBlock string
    (String) The IPv4 range of the subnet.
    Name string
    (String) The user-defined name for this routing table.
    NetworkAcl string
    (String) The ID of the network ACL for the subnet.
    PublicGateway string
    (String) The ID of the public gateway for the subnet.
    ResourceControllerUrl string
    ResourceCrn string
    ResourceGroup string
    (String) The subnet resource group.
    ResourceGroupName string
    ResourceName string
    ResourceStatus string
    RoutingTables List<GetIsSubnetRoutingTable>
    (List) The routing table for this subnet.
    Status string
    (String) The status of the subnet.
    Tags List<string>
    (String) Tags associated for the instance.
    TotalIpv4AddressCount double
    (Integer) The total number of IPv4 addresses.
    Vpc string
    (String) The ID of the VPC that the subnet belongs to.
    VpcName string
    (String) The name of the VPC that the subnet belongs to.
    Zone string
    (String) The subnet zone name.
    Identifier string
    AccessTags []string
    (String) Access management tags associated for the instance.
    AvailableIpv4AddressCount float64
    (Integer) The total number of available IPv4 addresses.
    Crn string
    (String) The crn for this routing table.
    Id string
    (String) The unique identifier for this routing table.
    Ipv4CidrBlock string
    (String) The IPv4 range of the subnet.
    Name string
    (String) The user-defined name for this routing table.
    NetworkAcl string
    (String) The ID of the network ACL for the subnet.
    PublicGateway string
    (String) The ID of the public gateway for the subnet.
    ResourceControllerUrl string
    ResourceCrn string
    ResourceGroup string
    (String) The subnet resource group.
    ResourceGroupName string
    ResourceName string
    ResourceStatus string
    RoutingTables []GetIsSubnetRoutingTable
    (List) The routing table for this subnet.
    Status string
    (String) The status of the subnet.
    Tags []string
    (String) Tags associated for the instance.
    TotalIpv4AddressCount float64
    (Integer) The total number of IPv4 addresses.
    Vpc string
    (String) The ID of the VPC that the subnet belongs to.
    VpcName string
    (String) The name of the VPC that the subnet belongs to.
    Zone string
    (String) The subnet zone name.
    Identifier string
    accessTags List<String>
    (String) Access management tags associated for the instance.
    availableIpv4AddressCount Double
    (Integer) The total number of available IPv4 addresses.
    crn String
    (String) The crn for this routing table.
    id String
    (String) The unique identifier for this routing table.
    ipv4CidrBlock String
    (String) The IPv4 range of the subnet.
    name String
    (String) The user-defined name for this routing table.
    networkAcl String
    (String) The ID of the network ACL for the subnet.
    publicGateway String
    (String) The ID of the public gateway for the subnet.
    resourceControllerUrl String
    resourceCrn String
    resourceGroup String
    (String) The subnet resource group.
    resourceGroupName String
    resourceName String
    resourceStatus String
    routingTables List<GetIsSubnetRoutingTable>
    (List) The routing table for this subnet.
    status String
    (String) The status of the subnet.
    tags List<String>
    (String) Tags associated for the instance.
    totalIpv4AddressCount Double
    (Integer) The total number of IPv4 addresses.
    vpc String
    (String) The ID of the VPC that the subnet belongs to.
    vpcName String
    (String) The name of the VPC that the subnet belongs to.
    zone String
    (String) The subnet zone name.
    identifier String
    accessTags string[]
    (String) Access management tags associated for the instance.
    availableIpv4AddressCount number
    (Integer) The total number of available IPv4 addresses.
    crn string
    (String) The crn for this routing table.
    id string
    (String) The unique identifier for this routing table.
    ipv4CidrBlock string
    (String) The IPv4 range of the subnet.
    name string
    (String) The user-defined name for this routing table.
    networkAcl string
    (String) The ID of the network ACL for the subnet.
    publicGateway string
    (String) The ID of the public gateway for the subnet.
    resourceControllerUrl string
    resourceCrn string
    resourceGroup string
    (String) The subnet resource group.
    resourceGroupName string
    resourceName string
    resourceStatus string
    routingTables GetIsSubnetRoutingTable[]
    (List) The routing table for this subnet.
    status string
    (String) The status of the subnet.
    tags string[]
    (String) Tags associated for the instance.
    totalIpv4AddressCount number
    (Integer) The total number of IPv4 addresses.
    vpc string
    (String) The ID of the VPC that the subnet belongs to.
    vpcName string
    (String) The name of the VPC that the subnet belongs to.
    zone string
    (String) The subnet zone name.
    identifier string
    access_tags Sequence[str]
    (String) Access management tags associated for the instance.
    available_ipv4_address_count float
    (Integer) The total number of available IPv4 addresses.
    crn str
    (String) The crn for this routing table.
    id str
    (String) The unique identifier for this routing table.
    ipv4_cidr_block str
    (String) The IPv4 range of the subnet.
    name str
    (String) The user-defined name for this routing table.
    network_acl str
    (String) The ID of the network ACL for the subnet.
    public_gateway str
    (String) The ID of the public gateway for the subnet.
    resource_controller_url str
    resource_crn str
    resource_group str
    (String) The subnet resource group.
    resource_group_name str
    resource_name str
    resource_status str
    routing_tables Sequence[GetIsSubnetRoutingTable]
    (List) The routing table for this subnet.
    status str
    (String) The status of the subnet.
    tags Sequence[str]
    (String) Tags associated for the instance.
    total_ipv4_address_count float
    (Integer) The total number of IPv4 addresses.
    vpc str
    (String) The ID of the VPC that the subnet belongs to.
    vpc_name str
    (String) The name of the VPC that the subnet belongs to.
    zone str
    (String) The subnet zone name.
    identifier str
    accessTags List<String>
    (String) Access management tags associated for the instance.
    availableIpv4AddressCount Number
    (Integer) The total number of available IPv4 addresses.
    crn String
    (String) The crn for this routing table.
    id String
    (String) The unique identifier for this routing table.
    ipv4CidrBlock String
    (String) The IPv4 range of the subnet.
    name String
    (String) The user-defined name for this routing table.
    networkAcl String
    (String) The ID of the network ACL for the subnet.
    publicGateway String
    (String) The ID of the public gateway for the subnet.
    resourceControllerUrl String
    resourceCrn String
    resourceGroup String
    (String) The subnet resource group.
    resourceGroupName String
    resourceName String
    resourceStatus String
    routingTables List<Property Map>
    (List) The routing table for this subnet.
    status String
    (String) The status of the subnet.
    tags List<String>
    (String) Tags associated for the instance.
    totalIpv4AddressCount Number
    (Integer) The total number of IPv4 addresses.
    vpc String
    (String) The ID of the VPC that the subnet belongs to.
    vpcName String
    (String) The name of the VPC that the subnet belongs to.
    zone String
    (String) The subnet zone name.
    identifier String

    Supporting Types

    GetIsSubnetRoutingTable

    Crn string
    (String) The crn for this routing table.
    Deleteds List<GetIsSubnetRoutingTableDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    Href string
    (String) The URL for this routing table.
    Id string
    (String) The unique identifier for this routing table.
    Name string
    The name of the subnet,name and identifier are mutually exclusive.
    ResourceType string
    (String) The type of resource referenced.
    Crn string
    (String) The crn for this routing table.
    Deleteds []GetIsSubnetRoutingTableDeleted
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    Href string
    (String) The URL for this routing table.
    Id string
    (String) The unique identifier for this routing table.
    Name string
    The name of the subnet,name and identifier are mutually exclusive.
    ResourceType string
    (String) The type of resource referenced.
    crn String
    (String) The crn for this routing table.
    deleteds List<GetIsSubnetRoutingTableDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    href String
    (String) The URL for this routing table.
    id String
    (String) The unique identifier for this routing table.
    name String
    The name of the subnet,name and identifier are mutually exclusive.
    resourceType String
    (String) The type of resource referenced.
    crn string
    (String) The crn for this routing table.
    deleteds GetIsSubnetRoutingTableDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    href string
    (String) The URL for this routing table.
    id string
    (String) The unique identifier for this routing table.
    name string
    The name of the subnet,name and identifier are mutually exclusive.
    resourceType string
    (String) The type of resource referenced.
    crn str
    (String) The crn for this routing table.
    deleteds Sequence[GetIsSubnetRoutingTableDeleted]
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    href str
    (String) The URL for this routing table.
    id str
    (String) The unique identifier for this routing table.
    name str
    The name of the subnet,name and identifier are mutually exclusive.
    resource_type str
    (String) The type of resource referenced.
    crn String
    (String) The crn for this routing table.
    deleteds List<Property Map>
    (List) If present, this property indicates the referenced resource has been deleted and provides some supplementary information.
    href String
    (String) The URL for this routing table.
    id String
    (String) The unique identifier for this routing table.
    name String
    The name of the subnet,name and identifier are mutually exclusive.
    resourceType String
    (String) The type of resource referenced.

    GetIsSubnetRoutingTableDeleted

    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