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

vcd.getNsxtEdgegatewayStaticRoute

Explore with Pulumi AI

Supported in provider v3.10+ and VCD 10.4.0+ with NSX-T.

Provides a data source to read NSX-T Edge Gateway Static Routes.

Example Usage

By Name Only)

import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";

const by_name = vcd.getNsxtEdgegatewayStaticRoute({
    edgeGatewayId: data.vcd_nsxt_edgegateway.existing.id,
    name: "existing-static-route",
});
Copy
import pulumi
import pulumi_vcd as vcd

by_name = vcd.get_nsxt_edgegateway_static_route(edge_gateway_id=data["vcd_nsxt_edgegateway"]["existing"]["id"],
    name="existing-static-route")
Copy
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 {
		_, err := vcd.LookupNsxtEdgegatewayStaticRoute(ctx, &vcd.LookupNsxtEdgegatewayStaticRouteArgs{
			EdgeGatewayId: data.Vcd_nsxt_edgegateway.Existing.Id,
			Name:          "existing-static-route",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;

return await Deployment.RunAsync(() => 
{
    var by_name = Vcd.GetNsxtEdgegatewayStaticRoute.Invoke(new()
    {
        EdgeGatewayId = data.Vcd_nsxt_edgegateway.Existing.Id,
        Name = "existing-static-route",
    });

});
Copy
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.GetNsxtEdgegatewayStaticRouteArgs;
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 by-name = VcdFunctions.getNsxtEdgegatewayStaticRoute(GetNsxtEdgegatewayStaticRouteArgs.builder()
            .edgeGatewayId(data.vcd_nsxt_edgegateway().existing().id())
            .name("existing-static-route")
            .build());

    }
}
Copy
variables:
  by-name:
    fn::invoke:
      function: vcd:getNsxtEdgegatewayStaticRoute
      arguments:
        edgeGatewayId: ${data.vcd_nsxt_edgegateway.existing.id}
        name: existing-static-route
Copy

By Name And Network CIDR )

import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";

const by_name_and_cidr = vcd.getNsxtEdgegatewayStaticRoute({
    edgeGatewayId: data.vcd_nsxt_edgegateway.existing.id,
    name: "duplicate-name-sr",
    networkCidr: "10.10.11.0/24",
});
Copy
import pulumi
import pulumi_vcd as vcd

by_name_and_cidr = vcd.get_nsxt_edgegateway_static_route(edge_gateway_id=data["vcd_nsxt_edgegateway"]["existing"]["id"],
    name="duplicate-name-sr",
    network_cidr="10.10.11.0/24")
Copy
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 {
		_, err := vcd.LookupNsxtEdgegatewayStaticRoute(ctx, &vcd.LookupNsxtEdgegatewayStaticRouteArgs{
			EdgeGatewayId: data.Vcd_nsxt_edgegateway.Existing.Id,
			Name:          "duplicate-name-sr",
			NetworkCidr:   pulumi.StringRef("10.10.11.0/24"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;

return await Deployment.RunAsync(() => 
{
    var by_name_and_cidr = Vcd.GetNsxtEdgegatewayStaticRoute.Invoke(new()
    {
        EdgeGatewayId = data.Vcd_nsxt_edgegateway.Existing.Id,
        Name = "duplicate-name-sr",
        NetworkCidr = "10.10.11.0/24",
    });

});
Copy
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.GetNsxtEdgegatewayStaticRouteArgs;
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 by-name-and-cidr = VcdFunctions.getNsxtEdgegatewayStaticRoute(GetNsxtEdgegatewayStaticRouteArgs.builder()
            .edgeGatewayId(data.vcd_nsxt_edgegateway().existing().id())
            .name("duplicate-name-sr")
            .networkCidr("10.10.11.0/24")
            .build());

    }
}
Copy
variables:
  by-name-and-cidr:
    fn::invoke:
      function: vcd:getNsxtEdgegatewayStaticRoute
      arguments:
        edgeGatewayId: ${data.vcd_nsxt_edgegateway.existing.id}
        name: duplicate-name-sr
        networkCidr: 10.10.11.0/24
Copy

Using getNsxtEdgegatewayStaticRoute

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 getNsxtEdgegatewayStaticRoute(args: GetNsxtEdgegatewayStaticRouteArgs, opts?: InvokeOptions): Promise<GetNsxtEdgegatewayStaticRouteResult>
function getNsxtEdgegatewayStaticRouteOutput(args: GetNsxtEdgegatewayStaticRouteOutputArgs, opts?: InvokeOptions): Output<GetNsxtEdgegatewayStaticRouteResult>
Copy
def get_nsxt_edgegateway_static_route(edge_gateway_id: Optional[str] = None,
                                      id: Optional[str] = None,
                                      name: Optional[str] = None,
                                      network_cidr: Optional[str] = None,
                                      org: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetNsxtEdgegatewayStaticRouteResult
def get_nsxt_edgegateway_static_route_output(edge_gateway_id: Optional[pulumi.Input[str]] = None,
                                      id: Optional[pulumi.Input[str]] = None,
                                      name: Optional[pulumi.Input[str]] = None,
                                      network_cidr: Optional[pulumi.Input[str]] = None,
                                      org: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetNsxtEdgegatewayStaticRouteResult]
Copy
func LookupNsxtEdgegatewayStaticRoute(ctx *Context, args *LookupNsxtEdgegatewayStaticRouteArgs, opts ...InvokeOption) (*LookupNsxtEdgegatewayStaticRouteResult, error)
func LookupNsxtEdgegatewayStaticRouteOutput(ctx *Context, args *LookupNsxtEdgegatewayStaticRouteOutputArgs, opts ...InvokeOption) LookupNsxtEdgegatewayStaticRouteResultOutput
Copy

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

public static class GetNsxtEdgegatewayStaticRoute 
{
    public static Task<GetNsxtEdgegatewayStaticRouteResult> InvokeAsync(GetNsxtEdgegatewayStaticRouteArgs args, InvokeOptions? opts = null)
    public static Output<GetNsxtEdgegatewayStaticRouteResult> Invoke(GetNsxtEdgegatewayStaticRouteInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNsxtEdgegatewayStaticRouteResult> getNsxtEdgegatewayStaticRoute(GetNsxtEdgegatewayStaticRouteArgs args, InvokeOptions options)
public static Output<GetNsxtEdgegatewayStaticRouteResult> getNsxtEdgegatewayStaticRoute(GetNsxtEdgegatewayStaticRouteArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vcd:index/getNsxtEdgegatewayStaticRoute:getNsxtEdgegatewayStaticRoute
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EdgeGatewayId This property is required. string
NSX-T Edge Gateway ID
Name This property is required. string
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
Id string
NetworkCidr string

Network CIDR for Static Route

It may happen that there are multiple NSX-T Static Routes with the same name. In such a case, a data source will return an error as it expects to find only one entity. If this happens, one can make the filtering more precise by supplying network_cidr in addition to name.

Org string
EdgeGatewayId This property is required. string
NSX-T Edge Gateway ID
Name This property is required. string
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
Id string
NetworkCidr string

Network CIDR for Static Route

It may happen that there are multiple NSX-T Static Routes with the same name. In such a case, a data source will return an error as it expects to find only one entity. If this happens, one can make the filtering more precise by supplying network_cidr in addition to name.

Org string
edgeGatewayId This property is required. String
NSX-T Edge Gateway ID
name This property is required. String
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
id String
networkCidr String

Network CIDR for Static Route

It may happen that there are multiple NSX-T Static Routes with the same name. In such a case, a data source will return an error as it expects to find only one entity. If this happens, one can make the filtering more precise by supplying network_cidr in addition to name.

org String
edgeGatewayId This property is required. string
NSX-T Edge Gateway ID
name This property is required. string
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
id string
networkCidr string

Network CIDR for Static Route

It may happen that there are multiple NSX-T Static Routes with the same name. In such a case, a data source will return an error as it expects to find only one entity. If this happens, one can make the filtering more precise by supplying network_cidr in addition to name.

org string
edge_gateway_id This property is required. str
NSX-T Edge Gateway ID
name This property is required. str
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
id str
network_cidr str

Network CIDR for Static Route

It may happen that there are multiple NSX-T Static Routes with the same name. In such a case, a data source will return an error as it expects to find only one entity. If this happens, one can make the filtering more precise by supplying network_cidr in addition to name.

org str
edgeGatewayId This property is required. String
NSX-T Edge Gateway ID
name This property is required. String
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
id String
networkCidr String

Network CIDR for Static Route

It may happen that there are multiple NSX-T Static Routes with the same name. In such a case, a data source will return an error as it expects to find only one entity. If this happens, one can make the filtering more precise by supplying network_cidr in addition to name.

org String

getNsxtEdgegatewayStaticRoute Result

The following output properties are available:

Supporting Types

GetNsxtEdgegatewayStaticRouteNextHop

AdminDistance This property is required. double
IpAddress This property is required. string
Scopes This property is required. List<GetNsxtEdgegatewayStaticRouteNextHopScope>
AdminDistance This property is required. float64
IpAddress This property is required. string
Scopes This property is required. []GetNsxtEdgegatewayStaticRouteNextHopScope
adminDistance This property is required. Double
ipAddress This property is required. String
scopes This property is required. List<GetNsxtEdgegatewayStaticRouteNextHopScope>
adminDistance This property is required. number
ipAddress This property is required. string
scopes This property is required. GetNsxtEdgegatewayStaticRouteNextHopScope[]
admin_distance This property is required. float
ip_address This property is required. str
scopes This property is required. Sequence[GetNsxtEdgegatewayStaticRouteNextHopScope]
adminDistance This property is required. Number
ipAddress This property is required. String
scopes This property is required. List<Property Map>

GetNsxtEdgegatewayStaticRouteNextHopScope

Id This property is required. string
Name This property is required. string
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
Type This property is required. string
Id This property is required. string
Name This property is required. string
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
Type This property is required. string
id This property is required. String
name This property is required. String
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
type This property is required. String
id This property is required. string
name This property is required. string
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
type This property is required. string
id This property is required. str
name This property is required. str
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
type This property is required. str
id This property is required. String
name This property is required. String
Name of Static Route. Note names can be duplicate and one can use network_cidr to make filtering more precise
type This property is required. String

Package Details

Repository
vcd vmware/terraform-provider-vcd
License
Notes
This Pulumi package is based on the vcd Terraform Provider.