vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getNetworkRoutedV2
Explore with Pulumi AI
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:
- Edge
Gateway stringId - Replaces
vdc
field and helps to identify exact Org Network - Filter
Get
Network Routed V2Filter - 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.
- Edge
Gateway stringId - Replaces
vdc
field and helps to identify exact Org Network - Filter
Get
Network Routed V2Filter - 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.
- edge
Gateway StringId - Replaces
vdc
field and helps to identify exact Org Network - filter
Get
Network Routed V2Filter - 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.
- edge
Gateway stringId - Replaces
vdc
field and helps to identify exact Org Network - filter
Get
Network Routed V2Filter - 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.
- edge_
gateway_ strid - Replaces
vdc
field and helps to identify exact Org Network - filter
Get
Network Routed V2Filter - 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.
- edge
Gateway StringId - 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.
getNetworkRoutedV2 Result
The following output properties are available:
- Description string
- Dns1 string
- Dns2 string
- Dns
Suffix string - Dual
Stack boolEnabled - Edge
Gateway stringId - Gateway string
- Guest
Vlan boolAllowed - Id string
- Interface
Type string - Metadata Dictionary<string, string>
- Metadata
Entries List<GetNetwork Routed V2Metadata Entry> - Owner
Id string - Parent VDC or VDC Group ID.
- Prefix
Length double - Route
Advertisement boolEnabled - Secondary
Gateway string - Secondary
Prefix stringLength - Secondary
Static List<GetIp Pools Network Routed V2Secondary Static Ip Pool> - Static
Ip List<GetPools Network Routed V2Static Ip Pool> - Filter
Get
Network Routed V2Filter - Name string
- Org string
- Vdc string
- Description string
- Dns1 string
- Dns2 string
- Dns
Suffix string - Dual
Stack boolEnabled - Edge
Gateway stringId - Gateway string
- Guest
Vlan boolAllowed - Id string
- Interface
Type string - Metadata map[string]string
- Metadata
Entries []GetNetwork Routed V2Metadata Entry - Owner
Id string - Parent VDC or VDC Group ID.
- Prefix
Length float64 - Route
Advertisement boolEnabled - Secondary
Gateway string - Secondary
Prefix stringLength - Secondary
Static []GetIp Pools Network Routed V2Secondary Static Ip Pool - Static
Ip []GetPools Network Routed V2Static Ip Pool - Filter
Get
Network Routed V2Filter - Name string
- Org string
- Vdc string
- description String
- dns1 String
- dns2 String
- dns
Suffix String - dual
Stack BooleanEnabled - edge
Gateway StringId - gateway String
- guest
Vlan BooleanAllowed - id String
- interface
Type String - metadata Map<String,String>
- metadata
Entries List<GetNetwork Routed V2Metadata Entry> - owner
Id String - Parent VDC or VDC Group ID.
- prefix
Length Double - route
Advertisement BooleanEnabled - secondary
Gateway String - secondary
Prefix StringLength - secondary
Static List<GetIp Pools Network Routed V2Secondary Static Ip Pool> - static
Ip List<GetPools Network Routed V2Static Ip Pool> - filter
Get
Network Routed V2Filter - name String
- org String
- vdc String
- description string
- dns1 string
- dns2 string
- dns
Suffix string - dual
Stack booleanEnabled - edge
Gateway stringId - gateway string
- guest
Vlan booleanAllowed - id string
- interface
Type string - metadata {[key: string]: string}
- metadata
Entries GetNetwork Routed V2Metadata Entry[] - owner
Id string - Parent VDC or VDC Group ID.
- prefix
Length number - route
Advertisement booleanEnabled - secondary
Gateway string - secondary
Prefix stringLength - secondary
Static GetIp Pools Network Routed V2Secondary Static Ip Pool[] - static
Ip GetPools Network Routed V2Static Ip Pool[] - filter
Get
Network Routed V2Filter - name string
- org string
- vdc string
- description str
- dns1 str
- dns2 str
- dns_
suffix str - dual_
stack_ boolenabled - edge_
gateway_ strid - gateway str
- guest_
vlan_ boolallowed - id str
- interface_
type str - metadata Mapping[str, str]
- metadata_
entries Sequence[GetNetwork Routed V2Metadata Entry] - owner_
id str - Parent VDC or VDC Group ID.
- prefix_
length float - route_
advertisement_ boolenabled - secondary_
gateway str - secondary_
prefix_ strlength - secondary_
static_ Sequence[Getip_ pools Network Routed V2Secondary Static Ip Pool] - static_
ip_ Sequence[Getpools Network Routed V2Static Ip Pool] - filter
Get
Network Routed V2Filter - name str
- org str
- vdc str
- description String
- dns1 String
- dns2 String
- dns
Suffix String - dual
Stack BooleanEnabled - edge
Gateway StringId - gateway String
- guest
Vlan BooleanAllowed - id String
- interface
Type String - metadata Map<String>
- metadata
Entries List<Property Map> - owner
Id String - Parent VDC or VDC Group ID.
- prefix
Length Number - route
Advertisement BooleanEnabled - secondary
Gateway String - secondary
Prefix StringLength - secondary
Static List<Property Map>Ip Pools - static
Ip List<Property Map>Pools - filter Property Map
- name String
- org String
- vdc String
Supporting Types
GetNetworkRoutedV2Filter
- ip str
- Search by IP. The value can be a regular expression
- name_
regex str - Search by name with a regular expression
GetNetworkRoutedV2MetadataEntry
- Is
System bool - Key string
- Type string
- User
Access string - Value string
- Is
System bool - Key string
- Type string
- User
Access string - Value string
- is
System Boolean - key String
- type String
- user
Access String - value String
- is
System boolean - key string
- type string
- user
Access string - value string
- is_
system bool - key str
- type str
- user_
access str - value str
- is
System Boolean - key String
- type String
- user
Access String - value String
GetNetworkRoutedV2SecondaryStaticIpPool
- End
Address string - Start
Address string
- End
Address string - Start
Address string
- end
Address String - start
Address String
- end
Address string - start
Address string
- end_
address str - start_
address str
- end
Address String - start
Address String
GetNetworkRoutedV2StaticIpPool
- End
Address string - Start
Address string
- End
Address string - Start
Address string
- end
Address String - start
Address String
- end
Address string - start
Address string
- end_
address str - start_
address str
- end
Address String - start
Address String
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.