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

vcd.getNsxtEdgegatewayStaticRoute

Start a Neo task
Explain and create a vcd.getNsxtEdgegatewayStaticRoute resource
vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    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:

    EdgeGatewayId string
    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
    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 string
    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
    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 String
    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
    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 string
    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
    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 str
    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 supplying network_cidr in addition to name.

    org str
    edgeGatewayId String
    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
    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

    GetNsxtEdgegatewayStaticRouteNextHopScope

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

    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
      Meet Neo: Your AI Platform Teammate