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

ibm.getIsVpcDefaultRoutingTable

Explore with Pulumi AI

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

    Retrieve information of an existing IBM Cloud Infrastructure Virtual Pricate Cloud default routing table as a read-only data source. For more information, about VPC default routing table, see about routing tables and routes.

    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 exampleIsVpc = new ibm.IsVpc("exampleIsVpc", {});
    const exampleIsVpcDefaultRoutingTable = ibm.getIsVpcDefaultRoutingTableOutput({
        vpc: exampleIsVpc.isVpcId,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example_is_vpc = ibm.IsVpc("exampleIsVpc")
    example_is_vpc_default_routing_table = ibm.get_is_vpc_default_routing_table_output(vpc=example_is_vpc.is_vpc_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 {
    		exampleIsVpc, err := ibm.NewIsVpc(ctx, "exampleIsVpc", nil)
    		if err != nil {
    			return err
    		}
    		_ = ibm.GetIsVpcDefaultRoutingTableOutput(ctx, ibm.GetIsVpcDefaultRoutingTableOutputArgs{
    			Vpc: exampleIsVpc.IsVpcId,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleIsVpc = new Ibm.IsVpc("exampleIsVpc");
    
        var exampleIsVpcDefaultRoutingTable = Ibm.GetIsVpcDefaultRoutingTable.Invoke(new()
        {
            Vpc = exampleIsVpc.IsVpcId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IsVpc;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetIsVpcDefaultRoutingTableArgs;
    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) {
            var exampleIsVpc = new IsVpc("exampleIsVpc");
    
            final var exampleIsVpcDefaultRoutingTable = IbmFunctions.getIsVpcDefaultRoutingTable(GetIsVpcDefaultRoutingTableArgs.builder()
                .vpc(exampleIsVpc.isVpcId())
                .build());
    
        }
    }
    
    resources:
      exampleIsVpc:
        type: ibm:IsVpc
    variables:
      exampleIsVpcDefaultRoutingTable:
        fn::invoke:
          function: ibm:getIsVpcDefaultRoutingTable
          arguments:
            vpc: ${exampleIsVpc.isVpcId}
    

    Using getIsVpcDefaultRoutingTable

    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 getIsVpcDefaultRoutingTable(args: GetIsVpcDefaultRoutingTableArgs, opts?: InvokeOptions): Promise<GetIsVpcDefaultRoutingTableResult>
    function getIsVpcDefaultRoutingTableOutput(args: GetIsVpcDefaultRoutingTableOutputArgs, opts?: InvokeOptions): Output<GetIsVpcDefaultRoutingTableResult>
    def get_is_vpc_default_routing_table(id: Optional[str] = None,
                                         vpc: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetIsVpcDefaultRoutingTableResult
    def get_is_vpc_default_routing_table_output(id: Optional[pulumi.Input[str]] = None,
                                         vpc: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetIsVpcDefaultRoutingTableResult]
    func GetIsVpcDefaultRoutingTable(ctx *Context, args *GetIsVpcDefaultRoutingTableArgs, opts ...InvokeOption) (*GetIsVpcDefaultRoutingTableResult, error)
    func GetIsVpcDefaultRoutingTableOutput(ctx *Context, args *GetIsVpcDefaultRoutingTableOutputArgs, opts ...InvokeOption) GetIsVpcDefaultRoutingTableResultOutput

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

    public static class GetIsVpcDefaultRoutingTable 
    {
        public static Task<GetIsVpcDefaultRoutingTableResult> InvokeAsync(GetIsVpcDefaultRoutingTableArgs args, InvokeOptions? opts = null)
        public static Output<GetIsVpcDefaultRoutingTableResult> Invoke(GetIsVpcDefaultRoutingTableInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsVpcDefaultRoutingTableResult> getIsVpcDefaultRoutingTable(GetIsVpcDefaultRoutingTableArgs args, InvokeOptions options)
    public static Output<GetIsVpcDefaultRoutingTableResult> getIsVpcDefaultRoutingTable(GetIsVpcDefaultRoutingTableArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsVpcDefaultRoutingTable:getIsVpcDefaultRoutingTable
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Vpc string
    The ID of the VPC.
    Id string
    (String) The unique ID of the subnet.
    Vpc string
    The ID of the VPC.
    Id string
    (String) The unique ID of the subnet.
    vpc String
    The ID of the VPC.
    id String
    (String) The unique ID of the subnet.
    vpc string
    The ID of the VPC.
    id string
    (String) The unique ID of the subnet.
    vpc str
    The ID of the VPC.
    id str
    (String) The unique ID of the subnet.
    vpc String
    The ID of the VPC.
    id String
    (String) The unique ID of the subnet.

    getIsVpcDefaultRoutingTable Result

    The following output properties are available:

    AccessTags List<string>
    (List) Access management tags associated for the default routing table.
    CreatedAt string
    (Timestamp) The date and time that the default routing table was created.
    Crn string
    (String) The crn for this default routing table.
    DefaultRoutingTable string
    (String) The unique identifier for this routing table.
    Href string
    (String) The routing table URL.
    Id string
    (String) The unique ID of the subnet.
    IsDefault bool
    (String) Indicates the default routing table for this VPC.
    LifecycleState string
    (String) The lifecycle state of the routing table.
    Name string
    (String) The name of the subnet.
    ResourceGroups List<GetIsVpcDefaultRoutingTableResourceGroup>
    ResourceType string
    (String) The resource type.
    RouteDirectLinkIngress bool
    (Bool) Indicates the routing table is used to route traffic that originates from Direct Link to the VPC.
    RouteInternetIngress bool
    (Bool) Indicates whether this routing table is used to route traffic that originates from the internet.
    RouteTransitGatewayIngress bool
    (Bool) Indicates the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    RouteVpcZoneIngress bool
    (Bool) Indicates the routing table is used to route traffic that originates from subnets in other zones in the VPC.
    Routes List<GetIsVpcDefaultRoutingTableRoute>
    (List) The routes for the default routing table.
    Subnets List<GetIsVpcDefaultRoutingTableSubnet>
    (List) The subnets to which routing table is attached.
    Tags List<string>
    (List) Tags associated with the default routing table.
    Vpc string
    AccessTags []string
    (List) Access management tags associated for the default routing table.
    CreatedAt string
    (Timestamp) The date and time that the default routing table was created.
    Crn string
    (String) The crn for this default routing table.
    DefaultRoutingTable string
    (String) The unique identifier for this routing table.
    Href string
    (String) The routing table URL.
    Id string
    (String) The unique ID of the subnet.
    IsDefault bool
    (String) Indicates the default routing table for this VPC.
    LifecycleState string
    (String) The lifecycle state of the routing table.
    Name string
    (String) The name of the subnet.
    ResourceGroups []GetIsVpcDefaultRoutingTableResourceGroup
    ResourceType string
    (String) The resource type.
    RouteDirectLinkIngress bool
    (Bool) Indicates the routing table is used to route traffic that originates from Direct Link to the VPC.
    RouteInternetIngress bool
    (Bool) Indicates whether this routing table is used to route traffic that originates from the internet.
    RouteTransitGatewayIngress bool
    (Bool) Indicates the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    RouteVpcZoneIngress bool
    (Bool) Indicates the routing table is used to route traffic that originates from subnets in other zones in the VPC.
    Routes []GetIsVpcDefaultRoutingTableRoute
    (List) The routes for the default routing table.
    Subnets []GetIsVpcDefaultRoutingTableSubnet
    (List) The subnets to which routing table is attached.
    Tags []string
    (List) Tags associated with the default routing table.
    Vpc string
    accessTags List<String>
    (List) Access management tags associated for the default routing table.
    createdAt String
    (Timestamp) The date and time that the default routing table was created.
    crn String
    (String) The crn for this default routing table.
    defaultRoutingTable String
    (String) The unique identifier for this routing table.
    href String
    (String) The routing table URL.
    id String
    (String) The unique ID of the subnet.
    isDefault Boolean
    (String) Indicates the default routing table for this VPC.
    lifecycleState String
    (String) The lifecycle state of the routing table.
    name String
    (String) The name of the subnet.
    resourceGroups List<GetIsVpcDefaultRoutingTableResourceGroup>
    resourceType String
    (String) The resource type.
    routeDirectLinkIngress Boolean
    (Bool) Indicates the routing table is used to route traffic that originates from Direct Link to the VPC.
    routeInternetIngress Boolean
    (Bool) Indicates whether this routing table is used to route traffic that originates from the internet.
    routeTransitGatewayIngress Boolean
    (Bool) Indicates the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    routeVpcZoneIngress Boolean
    (Bool) Indicates the routing table is used to route traffic that originates from subnets in other zones in the VPC.
    routes List<GetIsVpcDefaultRoutingTableRoute>
    (List) The routes for the default routing table.
    subnets List<GetIsVpcDefaultRoutingTableSubnet>
    (List) The subnets to which routing table is attached.
    tags List<String>
    (List) Tags associated with the default routing table.
    vpc String
    accessTags string[]
    (List) Access management tags associated for the default routing table.
    createdAt string
    (Timestamp) The date and time that the default routing table was created.
    crn string
    (String) The crn for this default routing table.
    defaultRoutingTable string
    (String) The unique identifier for this routing table.
    href string
    (String) The routing table URL.
    id string
    (String) The unique ID of the subnet.
    isDefault boolean
    (String) Indicates the default routing table for this VPC.
    lifecycleState string
    (String) The lifecycle state of the routing table.
    name string
    (String) The name of the subnet.
    resourceGroups GetIsVpcDefaultRoutingTableResourceGroup[]
    resourceType string
    (String) The resource type.
    routeDirectLinkIngress boolean
    (Bool) Indicates the routing table is used to route traffic that originates from Direct Link to the VPC.
    routeInternetIngress boolean
    (Bool) Indicates whether this routing table is used to route traffic that originates from the internet.
    routeTransitGatewayIngress boolean
    (Bool) Indicates the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    routeVpcZoneIngress boolean
    (Bool) Indicates the routing table is used to route traffic that originates from subnets in other zones in the VPC.
    routes GetIsVpcDefaultRoutingTableRoute[]
    (List) The routes for the default routing table.
    subnets GetIsVpcDefaultRoutingTableSubnet[]
    (List) The subnets to which routing table is attached.
    tags string[]
    (List) Tags associated with the default routing table.
    vpc string
    access_tags Sequence[str]
    (List) Access management tags associated for the default routing table.
    created_at str
    (Timestamp) The date and time that the default routing table was created.
    crn str
    (String) The crn for this default routing table.
    default_routing_table str
    (String) The unique identifier for this routing table.
    href str
    (String) The routing table URL.
    id str
    (String) The unique ID of the subnet.
    is_default bool
    (String) Indicates the default routing table for this VPC.
    lifecycle_state str
    (String) The lifecycle state of the routing table.
    name str
    (String) The name of the subnet.
    resource_groups Sequence[GetIsVpcDefaultRoutingTableResourceGroup]
    resource_type str
    (String) The resource type.
    route_direct_link_ingress bool
    (Bool) Indicates the routing table is used to route traffic that originates from Direct Link to the VPC.
    route_internet_ingress bool
    (Bool) Indicates whether this routing table is used to route traffic that originates from the internet.
    route_transit_gateway_ingress bool
    (Bool) Indicates the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    route_vpc_zone_ingress bool
    (Bool) Indicates the routing table is used to route traffic that originates from subnets in other zones in the VPC.
    routes Sequence[GetIsVpcDefaultRoutingTableRoute]
    (List) The routes for the default routing table.
    subnets Sequence[GetIsVpcDefaultRoutingTableSubnet]
    (List) The subnets to which routing table is attached.
    tags Sequence[str]
    (List) Tags associated with the default routing table.
    vpc str
    accessTags List<String>
    (List) Access management tags associated for the default routing table.
    createdAt String
    (Timestamp) The date and time that the default routing table was created.
    crn String
    (String) The crn for this default routing table.
    defaultRoutingTable String
    (String) The unique identifier for this routing table.
    href String
    (String) The routing table URL.
    id String
    (String) The unique ID of the subnet.
    isDefault Boolean
    (String) Indicates the default routing table for this VPC.
    lifecycleState String
    (String) The lifecycle state of the routing table.
    name String
    (String) The name of the subnet.
    resourceGroups List<Property Map>
    resourceType String
    (String) The resource type.
    routeDirectLinkIngress Boolean
    (Bool) Indicates the routing table is used to route traffic that originates from Direct Link to the VPC.
    routeInternetIngress Boolean
    (Bool) Indicates whether this routing table is used to route traffic that originates from the internet.
    routeTransitGatewayIngress Boolean
    (Bool) Indicates the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    routeVpcZoneIngress Boolean
    (Bool) Indicates the routing table is used to route traffic that originates from subnets in other zones in the VPC.
    routes List<Property Map>
    (List) The routes for the default routing table.
    subnets List<Property Map>
    (List) The subnets to which routing table is attached.
    tags List<String>
    (List) Tags associated with the default routing table.
    vpc String

    Supporting Types

    GetIsVpcDefaultRoutingTableResourceGroup

    Href string
    (String) The routing table URL.
    Id string
    (String) The unique ID of the subnet.
    Name string
    (String) The name of the subnet.
    Href string
    (String) The routing table URL.
    Id string
    (String) The unique ID of the subnet.
    Name string
    (String) The name of the subnet.
    href String
    (String) The routing table URL.
    id String
    (String) The unique ID of the subnet.
    name String
    (String) The name of the subnet.
    href string
    (String) The routing table URL.
    id string
    (String) The unique ID of the subnet.
    name string
    (String) The name of the subnet.
    href str
    (String) The routing table URL.
    id str
    (String) The unique ID of the subnet.
    name str
    (String) The name of the subnet.
    href String
    (String) The routing table URL.
    id String
    (String) The unique ID of the subnet.
    name String
    (String) The name of the subnet.

    GetIsVpcDefaultRoutingTableRoute

    Id string
    (String) The unique ID of the subnet.
    Name string
    (String) The name of the subnet.
    Id string
    (String) The unique ID of the subnet.
    Name string
    (String) The name of the subnet.
    id String
    (String) The unique ID of the subnet.
    name String
    (String) The name of the subnet.
    id string
    (String) The unique ID of the subnet.
    name string
    (String) The name of the subnet.
    id str
    (String) The unique ID of the subnet.
    name str
    (String) The name of the subnet.
    id String
    (String) The unique ID of the subnet.
    name String
    (String) The name of the subnet.

    GetIsVpcDefaultRoutingTableSubnet

    Id string
    (String) The unique ID of the subnet.
    Name string
    (String) The name of the subnet.
    Id string
    (String) The unique ID of the subnet.
    Name string
    (String) The name of the subnet.
    id String
    (String) The unique ID of the subnet.
    name String
    (String) The name of the subnet.
    id string
    (String) The unique ID of the subnet.
    name string
    (String) The name of the subnet.
    id str
    (String) The unique ID of the subnet.
    name str
    (String) The name of the subnet.
    id String
    (String) The unique ID of the subnet.
    name String
    (String) The name of the subnet.

    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