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

ibm.getIsVpcRoutingTables

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 VPC default routing tables. For more information, about VPC routing tables, 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 exampleIsVpcRoutingTables = ibm.getIsVpcRoutingTablesOutput({
        vpc: exampleIsVpc.isVpcId,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example_is_vpc = ibm.IsVpc("exampleIsVpc")
    example_is_vpc_routing_tables = ibm.get_is_vpc_routing_tables_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.GetIsVpcRoutingTablesOutput(ctx, ibm.GetIsVpcRoutingTablesOutputArgs{
    			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 exampleIsVpcRoutingTables = Ibm.GetIsVpcRoutingTables.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.GetIsVpcRoutingTablesArgs;
    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 exampleIsVpcRoutingTables = IbmFunctions.getIsVpcRoutingTables(GetIsVpcRoutingTablesArgs.builder()
                .vpc(exampleIsVpc.isVpcId())
                .build());
    
        }
    }
    
    resources:
      exampleIsVpc:
        type: ibm:IsVpc
    variables:
      exampleIsVpcRoutingTables:
        fn::invoke:
          function: ibm:getIsVpcRoutingTables
          arguments:
            vpc: ${exampleIsVpc.isVpcId}
    

    Using getIsVpcRoutingTables

    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 getIsVpcRoutingTables(args: GetIsVpcRoutingTablesArgs, opts?: InvokeOptions): Promise<GetIsVpcRoutingTablesResult>
    function getIsVpcRoutingTablesOutput(args: GetIsVpcRoutingTablesOutputArgs, opts?: InvokeOptions): Output<GetIsVpcRoutingTablesResult>
    def get_is_vpc_routing_tables(id: Optional[str] = None,
                                  is_default: Optional[bool] = None,
                                  vpc: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetIsVpcRoutingTablesResult
    def get_is_vpc_routing_tables_output(id: Optional[pulumi.Input[str]] = None,
                                  is_default: Optional[pulumi.Input[bool]] = None,
                                  vpc: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetIsVpcRoutingTablesResult]
    func GetIsVpcRoutingTables(ctx *Context, args *GetIsVpcRoutingTablesArgs, opts ...InvokeOption) (*GetIsVpcRoutingTablesResult, error)
    func GetIsVpcRoutingTablesOutput(ctx *Context, args *GetIsVpcRoutingTablesOutputArgs, opts ...InvokeOption) GetIsVpcRoutingTablesResultOutput

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

    public static class GetIsVpcRoutingTables 
    {
        public static Task<GetIsVpcRoutingTablesResult> InvokeAsync(GetIsVpcRoutingTablesArgs args, InvokeOptions? opts = null)
        public static Output<GetIsVpcRoutingTablesResult> Invoke(GetIsVpcRoutingTablesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsVpcRoutingTablesResult> getIsVpcRoutingTables(GetIsVpcRoutingTablesArgs args, InvokeOptions options)
    public static Output<GetIsVpcRoutingTablesResult> getIsVpcRoutingTables(GetIsVpcRoutingTablesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsVpcRoutingTables:getIsVpcRoutingTables
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Vpc string
    The ID of the VPC.
    Id string
    (String) The unique ID of the subnet.
    IsDefault bool
    Indicate whether this is the default routing table for this VPC
    Vpc string
    The ID of the VPC.
    Id string
    (String) The unique ID of the subnet.
    IsDefault bool
    Indicate whether this is the default routing table for this VPC
    vpc String
    The ID of the VPC.
    id String
    (String) The unique ID of the subnet.
    isDefault Boolean
    Indicate whether this is the default routing table for this VPC
    vpc string
    The ID of the VPC.
    id string
    (String) The unique ID of the subnet.
    isDefault boolean
    Indicate whether this is the default routing table for this VPC
    vpc str
    The ID of the VPC.
    id str
    (String) The unique ID of the subnet.
    is_default bool
    Indicate whether this is the default routing table for this VPC
    vpc String
    The ID of the VPC.
    id String
    (String) The unique ID of the subnet.
    isDefault Boolean
    Indicate whether this is the default routing table for this VPC

    getIsVpcRoutingTables Result

    The following output properties are available:

    Id string
    (String) The unique ID of the subnet.
    RoutingTables List<GetIsVpcRoutingTablesRoutingTable>
    (List) List of all the routing tables in a VPC.
    Vpc string
    IsDefault bool
    (String) Indicates whether the default routing table.
    Id string
    (String) The unique ID of the subnet.
    RoutingTables []GetIsVpcRoutingTablesRoutingTable
    (List) List of all the routing tables in a VPC.
    Vpc string
    IsDefault bool
    (String) Indicates whether the default routing table.
    id String
    (String) The unique ID of the subnet.
    routingTables List<GetIsVpcRoutingTablesRoutingTable>
    (List) List of all the routing tables in a VPC.
    vpc String
    isDefault Boolean
    (String) Indicates whether the default routing table.
    id string
    (String) The unique ID of the subnet.
    routingTables GetIsVpcRoutingTablesRoutingTable[]
    (List) List of all the routing tables in a VPC.
    vpc string
    isDefault boolean
    (String) Indicates whether the default routing table.
    id str
    (String) The unique ID of the subnet.
    routing_tables Sequence[GetIsVpcRoutingTablesRoutingTable]
    (List) List of all the routing tables in a VPC.
    vpc str
    is_default bool
    (String) Indicates whether the default routing table.
    id String
    (String) The unique ID of the subnet.
    routingTables List<Property Map>
    (List) List of all the routing tables in a VPC.
    vpc String
    isDefault Boolean
    (String) Indicates whether the default routing table.

    Supporting Types

    GetIsVpcRoutingTablesRoutingTable

    AcceptRoutesFroms List<GetIsVpcRoutingTablesRoutingTableAcceptRoutesFrom>
    (List) The filters specifying the resources that may create routes in this routing table.At present, only the resource_type filter is permitted, and only the vpn_gateway value is supported, but filter support is expected to expand in the future. Nested scheme for accept_routes_from:
    AccessTags List<string>
    (List) Access management tags associated for the routing table.
    AdvertiseRoutesTos List<string>
    (Optional, List) The ingress sources to advertise routes to. Routes in the table with advertise enabled will be advertised to these sources.
    CreatedAt string
    (Timestamp) The date and time the routing table was created.
    Href string
    (String) The URL for this resource group.
    IsDefault bool
    Indicate whether this is the default routing table for this VPC
    LifecycleState string
    (String) The lifecycle state of the routing table.
    Name string
    (String) The user-defined name of the subnet.
    ResourceGroups List<GetIsVpcRoutingTablesRoutingTableResourceGroup>
    (List) The resource group for this routing table. Nested scheme for resource_group:
    ResourceType string
    (String) The type of resource referenced.
    RouteDirectLinkIngress bool
    (String) Indicates if the routing table is used to route traffic that originates from Direct Link to the VPC.
    RouteInternetIngress bool
    (Boolean) Indicates whether this routing table is used to route traffic that originates from the internet.
    RouteTransitGatewayIngress bool
    (String) Indicates if the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    RouteVpcZoneIngress bool
    (String) Indicates if the routing table is used to route traffic that originates from subnets in other zones of the VPC.
    Routes List<GetIsVpcRoutingTablesRoutingTableRoute>
    (List) The routes for the routing table. Nested scheme for routes:
    RoutingTable string
    RoutingTableCrn string
    Subnets List<GetIsVpcRoutingTablesRoutingTableSubnet>
    (List) The subnets to which routing table is attached.
    Nested scheme for subnets:
    Tags List<string>
    (List) Tags associated with the routing table.
    AcceptRoutesFroms []GetIsVpcRoutingTablesRoutingTableAcceptRoutesFrom
    (List) The filters specifying the resources that may create routes in this routing table.At present, only the resource_type filter is permitted, and only the vpn_gateway value is supported, but filter support is expected to expand in the future. Nested scheme for accept_routes_from:
    AccessTags []string
    (List) Access management tags associated for the routing table.
    AdvertiseRoutesTos []string
    (Optional, List) The ingress sources to advertise routes to. Routes in the table with advertise enabled will be advertised to these sources.
    CreatedAt string
    (Timestamp) The date and time the routing table was created.
    Href string
    (String) The URL for this resource group.
    IsDefault bool
    Indicate whether this is the default routing table for this VPC
    LifecycleState string
    (String) The lifecycle state of the routing table.
    Name string
    (String) The user-defined name of the subnet.
    ResourceGroups []GetIsVpcRoutingTablesRoutingTableResourceGroup
    (List) The resource group for this routing table. Nested scheme for resource_group:
    ResourceType string
    (String) The type of resource referenced.
    RouteDirectLinkIngress bool
    (String) Indicates if the routing table is used to route traffic that originates from Direct Link to the VPC.
    RouteInternetIngress bool
    (Boolean) Indicates whether this routing table is used to route traffic that originates from the internet.
    RouteTransitGatewayIngress bool
    (String) Indicates if the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    RouteVpcZoneIngress bool
    (String) Indicates if the routing table is used to route traffic that originates from subnets in other zones of the VPC.
    Routes []GetIsVpcRoutingTablesRoutingTableRoute
    (List) The routes for the routing table. Nested scheme for routes:
    RoutingTable string
    RoutingTableCrn string
    Subnets []GetIsVpcRoutingTablesRoutingTableSubnet
    (List) The subnets to which routing table is attached.
    Nested scheme for subnets:
    Tags []string
    (List) Tags associated with the routing table.
    acceptRoutesFroms List<GetIsVpcRoutingTablesRoutingTableAcceptRoutesFrom>
    (List) The filters specifying the resources that may create routes in this routing table.At present, only the resource_type filter is permitted, and only the vpn_gateway value is supported, but filter support is expected to expand in the future. Nested scheme for accept_routes_from:
    accessTags List<String>
    (List) Access management tags associated for the routing table.
    advertiseRoutesTos List<String>
    (Optional, List) The ingress sources to advertise routes to. Routes in the table with advertise enabled will be advertised to these sources.
    createdAt String
    (Timestamp) The date and time the routing table was created.
    href String
    (String) The URL for this resource group.
    isDefault Boolean
    Indicate whether this is the default routing table for this VPC
    lifecycleState String
    (String) The lifecycle state of the routing table.
    name String
    (String) The user-defined name of the subnet.
    resourceGroups List<GetIsVpcRoutingTablesRoutingTableResourceGroup>
    (List) The resource group for this routing table. Nested scheme for resource_group:
    resourceType String
    (String) The type of resource referenced.
    routeDirectLinkIngress Boolean
    (String) Indicates if the routing table is used to route traffic that originates from Direct Link to the VPC.
    routeInternetIngress Boolean
    (Boolean) Indicates whether this routing table is used to route traffic that originates from the internet.
    routeTransitGatewayIngress Boolean
    (String) Indicates if the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    routeVpcZoneIngress Boolean
    (String) Indicates if the routing table is used to route traffic that originates from subnets in other zones of the VPC.
    routes List<GetIsVpcRoutingTablesRoutingTableRoute>
    (List) The routes for the routing table. Nested scheme for routes:
    routingTable String
    routingTableCrn String
    subnets List<GetIsVpcRoutingTablesRoutingTableSubnet>
    (List) The subnets to which routing table is attached.
    Nested scheme for subnets:
    tags List<String>
    (List) Tags associated with the routing table.
    acceptRoutesFroms GetIsVpcRoutingTablesRoutingTableAcceptRoutesFrom[]
    (List) The filters specifying the resources that may create routes in this routing table.At present, only the resource_type filter is permitted, and only the vpn_gateway value is supported, but filter support is expected to expand in the future. Nested scheme for accept_routes_from:
    accessTags string[]
    (List) Access management tags associated for the routing table.
    advertiseRoutesTos string[]
    (Optional, List) The ingress sources to advertise routes to. Routes in the table with advertise enabled will be advertised to these sources.
    createdAt string
    (Timestamp) The date and time the routing table was created.
    href string
    (String) The URL for this resource group.
    isDefault boolean
    Indicate whether this is the default routing table for this VPC
    lifecycleState string
    (String) The lifecycle state of the routing table.
    name string
    (String) The user-defined name of the subnet.
    resourceGroups GetIsVpcRoutingTablesRoutingTableResourceGroup[]
    (List) The resource group for this routing table. Nested scheme for resource_group:
    resourceType string
    (String) The type of resource referenced.
    routeDirectLinkIngress boolean
    (String) Indicates if the routing table is used to route traffic that originates from Direct Link to the VPC.
    routeInternetIngress boolean
    (Boolean) Indicates whether this routing table is used to route traffic that originates from the internet.
    routeTransitGatewayIngress boolean
    (String) Indicates if the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    routeVpcZoneIngress boolean
    (String) Indicates if the routing table is used to route traffic that originates from subnets in other zones of the VPC.
    routes GetIsVpcRoutingTablesRoutingTableRoute[]
    (List) The routes for the routing table. Nested scheme for routes:
    routingTable string
    routingTableCrn string
    subnets GetIsVpcRoutingTablesRoutingTableSubnet[]
    (List) The subnets to which routing table is attached.
    Nested scheme for subnets:
    tags string[]
    (List) Tags associated with the routing table.
    accept_routes_froms Sequence[GetIsVpcRoutingTablesRoutingTableAcceptRoutesFrom]
    (List) The filters specifying the resources that may create routes in this routing table.At present, only the resource_type filter is permitted, and only the vpn_gateway value is supported, but filter support is expected to expand in the future. Nested scheme for accept_routes_from:
    access_tags Sequence[str]
    (List) Access management tags associated for the routing table.
    Sequence[str]
    (Optional, List) The ingress sources to advertise routes to. Routes in the table with advertise enabled will be advertised to these sources.
    created_at str
    (Timestamp) The date and time the routing table was created.
    href str
    (String) The URL for this resource group.
    is_default bool
    Indicate whether this is the default routing table for this VPC
    lifecycle_state str
    (String) The lifecycle state of the routing table.
    name str
    (String) The user-defined name of the subnet.
    resource_groups Sequence[GetIsVpcRoutingTablesRoutingTableResourceGroup]
    (List) The resource group for this routing table. Nested scheme for resource_group:
    resource_type str
    (String) The type of resource referenced.
    route_direct_link_ingress bool
    (String) Indicates if the routing table is used to route traffic that originates from Direct Link to the VPC.
    route_internet_ingress bool
    (Boolean) Indicates whether this routing table is used to route traffic that originates from the internet.
    route_transit_gateway_ingress bool
    (String) Indicates if the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    route_vpc_zone_ingress bool
    (String) Indicates if the routing table is used to route traffic that originates from subnets in other zones of the VPC.
    routes Sequence[GetIsVpcRoutingTablesRoutingTableRoute]
    (List) The routes for the routing table. Nested scheme for routes:
    routing_table str
    routing_table_crn str
    subnets Sequence[GetIsVpcRoutingTablesRoutingTableSubnet]
    (List) The subnets to which routing table is attached.
    Nested scheme for subnets:
    tags Sequence[str]
    (List) Tags associated with the routing table.
    acceptRoutesFroms List<Property Map>
    (List) The filters specifying the resources that may create routes in this routing table.At present, only the resource_type filter is permitted, and only the vpn_gateway value is supported, but filter support is expected to expand in the future. Nested scheme for accept_routes_from:
    accessTags List<String>
    (List) Access management tags associated for the routing table.
    advertiseRoutesTos List<String>
    (Optional, List) The ingress sources to advertise routes to. Routes in the table with advertise enabled will be advertised to these sources.
    createdAt String
    (Timestamp) The date and time the routing table was created.
    href String
    (String) The URL for this resource group.
    isDefault Boolean
    Indicate whether this is the default routing table for this VPC
    lifecycleState String
    (String) The lifecycle state of the routing table.
    name String
    (String) The user-defined name of the subnet.
    resourceGroups List<Property Map>
    (List) The resource group for this routing table. Nested scheme for resource_group:
    resourceType String
    (String) The type of resource referenced.
    routeDirectLinkIngress Boolean
    (String) Indicates if the routing table is used to route traffic that originates from Direct Link to the VPC.
    routeInternetIngress Boolean
    (Boolean) Indicates whether this routing table is used to route traffic that originates from the internet.
    routeTransitGatewayIngress Boolean
    (String) Indicates if the routing table is used to route traffic that originates from Transit Gateway to the VPC.
    routeVpcZoneIngress Boolean
    (String) Indicates if the routing table is used to route traffic that originates from subnets in other zones of the VPC.
    routes List<Property Map>
    (List) The routes for the routing table. Nested scheme for routes:
    routingTable String
    routingTableCrn String
    subnets List<Property Map>
    (List) The subnets to which routing table is attached.
    Nested scheme for subnets:
    tags List<String>
    (List) Tags associated with the routing table.

    GetIsVpcRoutingTablesRoutingTableAcceptRoutesFrom

    ResourceType string
    (String) The type of resource referenced.
    ResourceType string
    (String) The type of resource referenced.
    resourceType String
    (String) The type of resource referenced.
    resourceType string
    (String) The type of resource referenced.
    resource_type str
    (String) The type of resource referenced.
    resourceType String
    (String) The type of resource referenced.

    GetIsVpcRoutingTablesRoutingTableResourceGroup

    Href string
    (String) The URL for this resource group.
    Id string
    (String) The unique ID of the subnet.
    Name string
    (String) The user-defined name of the subnet.
    Href string
    (String) The URL for this resource group.
    Id string
    (String) The unique ID of the subnet.
    Name string
    (String) The user-defined name of the subnet.
    href String
    (String) The URL for this resource group.
    id String
    (String) The unique ID of the subnet.
    name String
    (String) The user-defined name of the subnet.
    href string
    (String) The URL for this resource group.
    id string
    (String) The unique ID of the subnet.
    name string
    (String) The user-defined name of the subnet.
    href str
    (String) The URL for this resource group.
    id str
    (String) The unique ID of the subnet.
    name str
    (String) The user-defined name of the subnet.
    href String
    (String) The URL for this resource group.
    id String
    (String) The unique ID of the subnet.
    name String
    (String) The user-defined name of the subnet.

    GetIsVpcRoutingTablesRoutingTableRoute

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

    GetIsVpcRoutingTablesRoutingTableSubnet

    Id string
    (String) The unique ID of the subnet.
    Name string
    (String) The user-defined name of the subnet.
    Id string
    (String) The unique ID of the subnet.
    Name string
    (String) The user-defined name of the subnet.
    id String
    (String) The unique ID of the subnet.
    name String
    (String) The user-defined name of the subnet.
    id string
    (String) The unique ID of the subnet.
    name string
    (String) The user-defined name of the subnet.
    id str
    (String) The unique ID of the subnet.
    name str
    (String) The user-defined name of the subnet.
    id String
    (String) The unique ID of the subnet.
    name String
    (String) The user-defined 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