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",
});
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")
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
})
}
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",
});
});
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());
}
}
variables:
by-name:
fn::invoke:
function: vcd:getNsxtEdgegatewayStaticRoute
arguments:
edgeGatewayId: ${data.vcd_nsxt_edgegateway.existing.id}
name: existing-static-route
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",
});
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")
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
})
}
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",
});
});
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());
}
}
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
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>
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]
func LookupNsxtEdgegatewayStaticRoute(ctx *Context, args *LookupNsxtEdgegatewayStaticRouteArgs, opts ...InvokeOption) (*LookupNsxtEdgegatewayStaticRouteResult, error)
func LookupNsxtEdgegatewayStaticRouteOutput(ctx *Context, args *LookupNsxtEdgegatewayStaticRouteOutputArgs, opts ...InvokeOption) LookupNsxtEdgegatewayStaticRouteResultOutput
> 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)
}
public static CompletableFuture<GetNsxtEdgegatewayStaticRouteResult> getNsxtEdgegatewayStaticRoute(GetNsxtEdgegatewayStaticRouteArgs args, InvokeOptions options)
public static Output<GetNsxtEdgegatewayStaticRouteResult> getNsxtEdgegatewayStaticRoute(GetNsxtEdgegatewayStaticRouteArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getNsxtEdgegatewayStaticRoute:getNsxtEdgegatewayStaticRoute
arguments:
# arguments dictionary
The following arguments are supported:
- Edge
Gateway stringId - NSX-T Edge Gateway ID
- Name string
- Name of Static Route. Note names can be duplicate and one can use
network_cidr
to make filtering more precise - Id string
- Network
Cidr 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 supplyingnetwork_cidr
in addition toname
.- Org string
- Edge
Gateway stringId - NSX-T Edge Gateway ID
- Name string
- Name of Static Route. Note names can be duplicate and one can use
network_cidr
to make filtering more precise - Id string
- Network
Cidr 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 supplyingnetwork_cidr
in addition toname
.- Org string
- edge
Gateway StringId - NSX-T Edge Gateway ID
- name String
- Name of Static Route. Note names can be duplicate and one can use
network_cidr
to make filtering more precise - id String
- network
Cidr 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 supplyingnetwork_cidr
in addition toname
.- org String
- edge
Gateway stringId - NSX-T Edge Gateway ID
- name string
- Name of Static Route. Note names can be duplicate and one can use
network_cidr
to make filtering more precise - id string
- network
Cidr 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 supplyingnetwork_cidr
in addition toname
.- org string
- edge_
gateway_ strid - NSX-T Edge Gateway ID
- name 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 supplyingnetwork_cidr
in addition toname
.- org str
- edge
Gateway StringId - NSX-T Edge Gateway ID
- name String
- Name of Static Route. Note names can be duplicate and one can use
network_cidr
to make filtering more precise - id String
- network
Cidr 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 supplyingnetwork_cidr
in addition toname
.- org String
getNsxtEdgegatewayStaticRoute Result
The following output properties are available:
- Description string
- Edge
Gateway stringId - Id string
- Name string
- Network
Cidr string - Next
Hops List<GetNsxt Edgegateway Static Route Next Hop> - Org string
- Description string
- Edge
Gateway stringId - Id string
- Name string
- Network
Cidr string - Next
Hops []GetNsxt Edgegateway Static Route Next Hop - Org string
- description String
- edge
Gateway StringId - id String
- name String
- network
Cidr String - next
Hops List<GetNsxt Edgegateway Static Route Next Hop> - org String
- description string
- edge
Gateway stringId - id string
- name string
- network
Cidr string - next
Hops GetNsxt Edgegateway Static Route Next Hop[] - org string
- description String
- edge
Gateway StringId - id String
- name String
- network
Cidr String - next
Hops List<Property Map> - org String
Supporting Types
GetNsxtEdgegatewayStaticRouteNextHop
- admin
Distance Number - ip
Address String - scopes List<Property Map>
GetNsxtEdgegatewayStaticRouteNextHopScope
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.