1. Packages
  2. Vcd Provider
  3. API Docs
  4. getNetworkRoutedV2
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.getNetworkRoutedV2

Explore with Pulumi AI

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    Provides a VMware Cloud Director Org VDC routed Network data source to read data or reference existing network (backed by NSX-T or NSX-V).

    Supported in provider v3.2+ for both NSX-T and NSX-V VDCs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const main = vcd.getNsxtEdgegateway({
        org: "my-org",
        name: "main-edge",
    });
    const net = main.then(main => vcd.getNetworkRoutedV2({
        org: "my-org",
        edgeGatewayId: main.id,
        name: "my-net",
    }));
    
    import pulumi
    import pulumi_vcd as vcd
    
    main = vcd.get_nsxt_edgegateway(org="my-org",
        name="main-edge")
    net = vcd.get_network_routed_v2(org="my-org",
        edge_gateway_id=main.id,
        name="my-net")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := vcd.LookupNsxtEdgegateway(ctx, &vcd.LookupNsxtEdgegatewayArgs{
    			Org:  pulumi.StringRef("my-org"),
    			Name: "main-edge",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vcd.LookupNetworkRoutedV2(ctx, &vcd.LookupNetworkRoutedV2Args{
    			Org:           pulumi.StringRef("my-org"),
    			EdgeGatewayId: pulumi.StringRef(main.Id),
    			Name:          pulumi.StringRef("my-net"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vcd = Pulumi.Vcd;
    
    return await Deployment.RunAsync(() => 
    {
        var main = Vcd.GetNsxtEdgegateway.Invoke(new()
        {
            Org = "my-org",
            Name = "main-edge",
        });
    
        var net = Vcd.GetNetworkRoutedV2.Invoke(new()
        {
            Org = "my-org",
            EdgeGatewayId = main.Apply(getNsxtEdgegatewayResult => getNsxtEdgegatewayResult.Id),
            Name = "my-net",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vcd.VcdFunctions;
    import com.pulumi.vcd.inputs.GetNsxtEdgegatewayArgs;
    import com.pulumi.vcd.inputs.GetNetworkRoutedV2Args;
    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 main = VcdFunctions.getNsxtEdgegateway(GetNsxtEdgegatewayArgs.builder()
                .org("my-org")
                .name("main-edge")
                .build());
    
            final var net = VcdFunctions.getNetworkRoutedV2(GetNetworkRoutedV2Args.builder()
                .org("my-org")
                .edgeGatewayId(main.applyValue(getNsxtEdgegatewayResult -> getNsxtEdgegatewayResult.id()))
                .name("my-net")
                .build());
    
        }
    }
    
    variables:
      main:
        fn::invoke:
          function: vcd:getNsxtEdgegateway
          arguments:
            org: my-org
            name: main-edge
      net:
        fn::invoke:
          function: vcd:getNetworkRoutedV2
          arguments:
            org: my-org
            edgeGatewayId: ${main.id}
            name: my-net
    

    Filter arguments

    • name_regex - (Optional) matches the name using a regular expression.
    • ip - (Optional) matches the IP of the resource using a regular expression.

    See Filters reference for details and examples.

    Using getNetworkRoutedV2

    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 getNetworkRoutedV2(args: GetNetworkRoutedV2Args, opts?: InvokeOptions): Promise<GetNetworkRoutedV2Result>
    function getNetworkRoutedV2Output(args: GetNetworkRoutedV2OutputArgs, opts?: InvokeOptions): Output<GetNetworkRoutedV2Result>
    def get_network_routed_v2(edge_gateway_id: Optional[str] = None,
                              filter: Optional[GetNetworkRoutedV2Filter] = None,
                              id: Optional[str] = None,
                              name: Optional[str] = None,
                              org: Optional[str] = None,
                              vdc: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetNetworkRoutedV2Result
    def get_network_routed_v2_output(edge_gateway_id: Optional[pulumi.Input[str]] = None,
                              filter: Optional[pulumi.Input[GetNetworkRoutedV2FilterArgs]] = None,
                              id: Optional[pulumi.Input[str]] = None,
                              name: Optional[pulumi.Input[str]] = None,
                              org: Optional[pulumi.Input[str]] = None,
                              vdc: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetNetworkRoutedV2Result]
    func LookupNetworkRoutedV2(ctx *Context, args *LookupNetworkRoutedV2Args, opts ...InvokeOption) (*LookupNetworkRoutedV2Result, error)
    func LookupNetworkRoutedV2Output(ctx *Context, args *LookupNetworkRoutedV2OutputArgs, opts ...InvokeOption) LookupNetworkRoutedV2ResultOutput

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

    public static class GetNetworkRoutedV2 
    {
        public static Task<GetNetworkRoutedV2Result> InvokeAsync(GetNetworkRoutedV2Args args, InvokeOptions? opts = null)
        public static Output<GetNetworkRoutedV2Result> Invoke(GetNetworkRoutedV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkRoutedV2Result> getNetworkRoutedV2(GetNetworkRoutedV2Args args, InvokeOptions options)
    public static Output<GetNetworkRoutedV2Result> getNetworkRoutedV2(GetNetworkRoutedV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getNetworkRoutedV2:getNetworkRoutedV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EdgeGatewayId string
    Replaces vdc field and helps to identify exact Org Network
    Filter GetNetworkRoutedV2Filter
    Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
    Id string
    Name string
    A unique name for the network (optional when filter is used)
    Org string
    The name of organization to use, optional if defined at provider level
    Vdc string
    The name of VDC to use, optional if defined at provider level. Deprecated in favor of edge_gateway_id field.

    Deprecated: Deprecated

    EdgeGatewayId string
    Replaces vdc field and helps to identify exact Org Network
    Filter GetNetworkRoutedV2Filter
    Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
    Id string
    Name string
    A unique name for the network (optional when filter is used)
    Org string
    The name of organization to use, optional if defined at provider level
    Vdc string
    The name of VDC to use, optional if defined at provider level. Deprecated in favor of edge_gateway_id field.

    Deprecated: Deprecated

    edgeGatewayId String
    Replaces vdc field and helps to identify exact Org Network
    filter GetNetworkRoutedV2Filter
    Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
    id String
    name String
    A unique name for the network (optional when filter is used)
    org String
    The name of organization to use, optional if defined at provider level
    vdc String
    The name of VDC to use, optional if defined at provider level. Deprecated in favor of edge_gateway_id field.

    Deprecated: Deprecated

    edgeGatewayId string
    Replaces vdc field and helps to identify exact Org Network
    filter GetNetworkRoutedV2Filter
    Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
    id string
    name string
    A unique name for the network (optional when filter is used)
    org string
    The name of organization to use, optional if defined at provider level
    vdc string
    The name of VDC to use, optional if defined at provider level. Deprecated in favor of edge_gateway_id field.

    Deprecated: Deprecated

    edge_gateway_id str
    Replaces vdc field and helps to identify exact Org Network
    filter GetNetworkRoutedV2Filter
    Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
    id str
    name str
    A unique name for the network (optional when filter is used)
    org str
    The name of organization to use, optional if defined at provider level
    vdc str
    The name of VDC to use, optional if defined at provider level. Deprecated in favor of edge_gateway_id field.

    Deprecated: Deprecated

    edgeGatewayId String
    Replaces vdc field and helps to identify exact Org Network
    filter Property Map
    Retrieves the data source using one or more filter parameters. Note filters do not support searching for networks in VDC Groups.
    id String
    name String
    A unique name for the network (optional when filter is used)
    org String
    The name of organization to use, optional if defined at provider level
    vdc String
    The name of VDC to use, optional if defined at provider level. Deprecated in favor of edge_gateway_id field.

    Deprecated: Deprecated

    getNetworkRoutedV2 Result

    The following output properties are available:

    description String
    dns1 String
    dns2 String
    dnsSuffix String
    dualStackEnabled Boolean
    edgeGatewayId String
    gateway String
    guestVlanAllowed Boolean
    id String
    interfaceType String
    metadata Map<String>

    Deprecated: Deprecated

    metadataEntries List<Property Map>
    ownerId String
    Parent VDC or VDC Group ID.
    prefixLength Number
    routeAdvertisementEnabled Boolean
    secondaryGateway String
    secondaryPrefixLength String
    secondaryStaticIpPools List<Property Map>
    staticIpPools List<Property Map>
    filter Property Map
    name String
    org String
    vdc String

    Deprecated: Deprecated

    Supporting Types

    GetNetworkRoutedV2Filter

    Ip string
    Search by IP. The value can be a regular expression
    NameRegex string
    Search by name with a regular expression
    Ip string
    Search by IP. The value can be a regular expression
    NameRegex string
    Search by name with a regular expression
    ip String
    Search by IP. The value can be a regular expression
    nameRegex String
    Search by name with a regular expression
    ip string
    Search by IP. The value can be a regular expression
    nameRegex string
    Search by name with a regular expression
    ip str
    Search by IP. The value can be a regular expression
    name_regex str
    Search by name with a regular expression
    ip String
    Search by IP. The value can be a regular expression
    nameRegex String
    Search by name with a regular expression

    GetNetworkRoutedV2MetadataEntry

    IsSystem bool
    Key string
    Type string
    UserAccess string
    Value string
    IsSystem bool
    Key string
    Type string
    UserAccess string
    Value string
    isSystem Boolean
    key String
    type String
    userAccess String
    value String
    isSystem boolean
    key string
    type string
    userAccess string
    value string
    isSystem Boolean
    key String
    type String
    userAccess String
    value String

    GetNetworkRoutedV2SecondaryStaticIpPool

    GetNetworkRoutedV2StaticIpPool

    Package Details

    Repository
    vcd vmware/terraform-provider-vcd
    License
    Notes
    This Pulumi package is based on the vcd Terraform Provider.
    vcd logo
    vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware