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

vcd.getNsxtRouteAdvertisement

Explore with Pulumi AI

Provides a VMware Cloud Director data source for reading route advertisement in an NSX-T Edge Gateway.

Example Usage

Reading Route Advertisement From NSX-T Edge Gateway)

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

const group1 = vcd.getVdcGroup({
    name: "my-vdc-group",
});
const t1 = group1.then(group1 => vcd.getNsxtEdgegateway({
    ownerId: group1.id,
    name: "my-nsxt-edge-gateway",
}));
const routeAdvertisement = t1.then(t1 => vcd.getNsxtRouteAdvertisement({
    edgeGatewayId: t1.id,
}));
Copy
import pulumi
import pulumi_vcd as vcd

group1 = vcd.get_vdc_group(name="my-vdc-group")
t1 = vcd.get_nsxt_edgegateway(owner_id=group1.id,
    name="my-nsxt-edge-gateway")
route_advertisement = vcd.get_nsxt_route_advertisement(edge_gateway_id=t1.id)
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 {
		group1, err := vcd.LookupVdcGroup(ctx, &vcd.LookupVdcGroupArgs{
			Name: pulumi.StringRef("my-vdc-group"),
		}, nil)
		if err != nil {
			return err
		}
		t1, err := vcd.LookupNsxtEdgegateway(ctx, &vcd.LookupNsxtEdgegatewayArgs{
			OwnerId: pulumi.StringRef(group1.Id),
			Name:    "my-nsxt-edge-gateway",
		}, nil)
		if err != nil {
			return err
		}
		_, err = vcd.LookupNsxtRouteAdvertisement(ctx, &vcd.LookupNsxtRouteAdvertisementArgs{
			EdgeGatewayId: t1.Id,
		}, 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 group1 = Vcd.GetVdcGroup.Invoke(new()
    {
        Name = "my-vdc-group",
    });

    var t1 = Vcd.GetNsxtEdgegateway.Invoke(new()
    {
        OwnerId = group1.Apply(getVdcGroupResult => getVdcGroupResult.Id),
        Name = "my-nsxt-edge-gateway",
    });

    var routeAdvertisement = Vcd.GetNsxtRouteAdvertisement.Invoke(new()
    {
        EdgeGatewayId = t1.Apply(getNsxtEdgegatewayResult => getNsxtEdgegatewayResult.Id),
    });

});
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.GetVdcGroupArgs;
import com.pulumi.vcd.inputs.GetNsxtEdgegatewayArgs;
import com.pulumi.vcd.inputs.GetNsxtRouteAdvertisementArgs;
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 group1 = VcdFunctions.getVdcGroup(GetVdcGroupArgs.builder()
            .name("my-vdc-group")
            .build());

        final var t1 = VcdFunctions.getNsxtEdgegateway(GetNsxtEdgegatewayArgs.builder()
            .ownerId(group1.applyValue(getVdcGroupResult -> getVdcGroupResult.id()))
            .name("my-nsxt-edge-gateway")
            .build());

        final var routeAdvertisement = VcdFunctions.getNsxtRouteAdvertisement(GetNsxtRouteAdvertisementArgs.builder()
            .edgeGatewayId(t1.applyValue(getNsxtEdgegatewayResult -> getNsxtEdgegatewayResult.id()))
            .build());

    }
}
Copy
variables:
  group1:
    fn::invoke:
      function: vcd:getVdcGroup
      arguments:
        name: my-vdc-group
  t1:
    fn::invoke:
      function: vcd:getNsxtEdgegateway
      arguments:
        ownerId: ${group1.id}
        name: my-nsxt-edge-gateway
  routeAdvertisement:
    fn::invoke:
      function: vcd:getNsxtRouteAdvertisement
      arguments:
        edgeGatewayId: ${t1.id}
Copy

Using getNsxtRouteAdvertisement

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 getNsxtRouteAdvertisement(args: GetNsxtRouteAdvertisementArgs, opts?: InvokeOptions): Promise<GetNsxtRouteAdvertisementResult>
function getNsxtRouteAdvertisementOutput(args: GetNsxtRouteAdvertisementOutputArgs, opts?: InvokeOptions): Output<GetNsxtRouteAdvertisementResult>
Copy
def get_nsxt_route_advertisement(edge_gateway_id: Optional[str] = None,
                                 id: Optional[str] = None,
                                 org: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetNsxtRouteAdvertisementResult
def get_nsxt_route_advertisement_output(edge_gateway_id: Optional[pulumi.Input[str]] = None,
                                 id: Optional[pulumi.Input[str]] = None,
                                 org: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetNsxtRouteAdvertisementResult]
Copy
func LookupNsxtRouteAdvertisement(ctx *Context, args *LookupNsxtRouteAdvertisementArgs, opts ...InvokeOption) (*LookupNsxtRouteAdvertisementResult, error)
func LookupNsxtRouteAdvertisementOutput(ctx *Context, args *LookupNsxtRouteAdvertisementOutputArgs, opts ...InvokeOption) LookupNsxtRouteAdvertisementResultOutput
Copy

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

public static class GetNsxtRouteAdvertisement 
{
    public static Task<GetNsxtRouteAdvertisementResult> InvokeAsync(GetNsxtRouteAdvertisementArgs args, InvokeOptions? opts = null)
    public static Output<GetNsxtRouteAdvertisementResult> Invoke(GetNsxtRouteAdvertisementInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNsxtRouteAdvertisementResult> getNsxtRouteAdvertisement(GetNsxtRouteAdvertisementArgs args, InvokeOptions options)
public static Output<GetNsxtRouteAdvertisementResult> getNsxtRouteAdvertisement(GetNsxtRouteAdvertisementArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vcd:index/getNsxtRouteAdvertisement:getNsxtRouteAdvertisement
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EdgeGatewayId This property is required. string
NSX-T Edge Gateway ID in which route advertisement is located.
Id string
Org string
The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.
EdgeGatewayId This property is required. string
NSX-T Edge Gateway ID in which route advertisement is located.
Id string
Org string
The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.
edgeGatewayId This property is required. String
NSX-T Edge Gateway ID in which route advertisement is located.
id String
org String
The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.
edgeGatewayId This property is required. string
NSX-T Edge Gateway ID in which route advertisement is located.
id string
org string
The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.
edge_gateway_id This property is required. str
NSX-T Edge Gateway ID in which route advertisement is located.
id str
org str
The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.
edgeGatewayId This property is required. String
NSX-T Edge Gateway ID in which route advertisement is located.
id String
org String
The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.

getNsxtRouteAdvertisement Result

The following output properties are available:

EdgeGatewayId string
Enabled bool
Id string
Subnets List<string>
Org string
EdgeGatewayId string
Enabled bool
Id string
Subnets []string
Org string
edgeGatewayId String
enabled Boolean
id String
subnets List<String>
org String
edgeGatewayId string
enabled boolean
id string
subnets string[]
org string
edge_gateway_id str
enabled bool
id str
subnets Sequence[str]
org str
edgeGatewayId String
enabled Boolean
id String
subnets List<String>
org String

Package Details

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