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

vcd.getNsxtEdgegatewayBgpIpPrefixList

Explore with Pulumi AI

Supported in provider v3.7+ and VCD 10.2+ with NSX-T

Provides a resource to manage NSX-T Edge Gateway BGP IP Prefix Lists. IP prefix lists can contain single or multiple IP addresses and can be used to assign BGP neighbors with access permissions for route advertisement.

Example Usage

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

const g1 = vcd.getVdcGroup({
    org: "my-org",
    name: "my-vdc-group",
});
const testingNsxtEdgegateway = g1.then(g1 => vcd.getNsxtEdgegateway({
    org: "my-org",
    ownerId: g1.id,
    name: "my-edge-gateway",
}));
const testingNsxtEdgegatewayBgpIpPrefixList = testingNsxtEdgegateway.then(testingNsxtEdgegateway => vcd.getNsxtEdgegatewayBgpIpPrefixList({
    org: "my-org",
    edgeGatewayId: testingNsxtEdgegateway.id,
    name: "my-bgp-prefix-list",
}));
Copy
import pulumi
import pulumi_vcd as vcd

g1 = vcd.get_vdc_group(org="my-org",
    name="my-vdc-group")
testing_nsxt_edgegateway = vcd.get_nsxt_edgegateway(org="my-org",
    owner_id=g1.id,
    name="my-edge-gateway")
testing_nsxt_edgegateway_bgp_ip_prefix_list = vcd.get_nsxt_edgegateway_bgp_ip_prefix_list(org="my-org",
    edge_gateway_id=testing_nsxt_edgegateway.id,
    name="my-bgp-prefix-list")
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 {
		g1, err := vcd.LookupVdcGroup(ctx, &vcd.LookupVdcGroupArgs{
			Org:  pulumi.StringRef("my-org"),
			Name: pulumi.StringRef("my-vdc-group"),
		}, nil)
		if err != nil {
			return err
		}
		testingNsxtEdgegateway, err := vcd.LookupNsxtEdgegateway(ctx, &vcd.LookupNsxtEdgegatewayArgs{
			Org:     pulumi.StringRef("my-org"),
			OwnerId: pulumi.StringRef(g1.Id),
			Name:    "my-edge-gateway",
		}, nil)
		if err != nil {
			return err
		}
		_, err = vcd.LookupNsxtEdgegatewayBgpIpPrefixList(ctx, &vcd.LookupNsxtEdgegatewayBgpIpPrefixListArgs{
			Org:           pulumi.StringRef("my-org"),
			EdgeGatewayId: testingNsxtEdgegateway.Id,
			Name:          "my-bgp-prefix-list",
		}, 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 g1 = Vcd.GetVdcGroup.Invoke(new()
    {
        Org = "my-org",
        Name = "my-vdc-group",
    });

    var testingNsxtEdgegateway = Vcd.GetNsxtEdgegateway.Invoke(new()
    {
        Org = "my-org",
        OwnerId = g1.Apply(getVdcGroupResult => getVdcGroupResult.Id),
        Name = "my-edge-gateway",
    });

    var testingNsxtEdgegatewayBgpIpPrefixList = Vcd.GetNsxtEdgegatewayBgpIpPrefixList.Invoke(new()
    {
        Org = "my-org",
        EdgeGatewayId = testingNsxtEdgegateway.Apply(getNsxtEdgegatewayResult => getNsxtEdgegatewayResult.Id),
        Name = "my-bgp-prefix-list",
    });

});
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.GetNsxtEdgegatewayBgpIpPrefixListArgs;
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 g1 = VcdFunctions.getVdcGroup(GetVdcGroupArgs.builder()
            .org("my-org")
            .name("my-vdc-group")
            .build());

        final var testingNsxtEdgegateway = VcdFunctions.getNsxtEdgegateway(GetNsxtEdgegatewayArgs.builder()
            .org("my-org")
            .ownerId(g1.applyValue(getVdcGroupResult -> getVdcGroupResult.id()))
            .name("my-edge-gateway")
            .build());

        final var testingNsxtEdgegatewayBgpIpPrefixList = VcdFunctions.getNsxtEdgegatewayBgpIpPrefixList(GetNsxtEdgegatewayBgpIpPrefixListArgs.builder()
            .org("my-org")
            .edgeGatewayId(testingNsxtEdgegateway.applyValue(getNsxtEdgegatewayResult -> getNsxtEdgegatewayResult.id()))
            .name("my-bgp-prefix-list")
            .build());

    }
}
Copy
variables:
  g1:
    fn::invoke:
      function: vcd:getVdcGroup
      arguments:
        org: my-org
        name: my-vdc-group
  testingNsxtEdgegateway:
    fn::invoke:
      function: vcd:getNsxtEdgegateway
      arguments:
        org: my-org
        ownerId: ${g1.id}
        name: my-edge-gateway
  testingNsxtEdgegatewayBgpIpPrefixList:
    fn::invoke:
      function: vcd:getNsxtEdgegatewayBgpIpPrefixList
      arguments:
        org: my-org
        edgeGatewayId: ${testingNsxtEdgegateway.id}
        name: my-bgp-prefix-list
Copy

Using getNsxtEdgegatewayBgpIpPrefixList

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 getNsxtEdgegatewayBgpIpPrefixList(args: GetNsxtEdgegatewayBgpIpPrefixListArgs, opts?: InvokeOptions): Promise<GetNsxtEdgegatewayBgpIpPrefixListResult>
function getNsxtEdgegatewayBgpIpPrefixListOutput(args: GetNsxtEdgegatewayBgpIpPrefixListOutputArgs, opts?: InvokeOptions): Output<GetNsxtEdgegatewayBgpIpPrefixListResult>
Copy
def get_nsxt_edgegateway_bgp_ip_prefix_list(edge_gateway_id: Optional[str] = None,
                                            id: Optional[str] = None,
                                            name: Optional[str] = None,
                                            org: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetNsxtEdgegatewayBgpIpPrefixListResult
def get_nsxt_edgegateway_bgp_ip_prefix_list_output(edge_gateway_id: Optional[pulumi.Input[str]] = None,
                                            id: Optional[pulumi.Input[str]] = None,
                                            name: Optional[pulumi.Input[str]] = None,
                                            org: Optional[pulumi.Input[str]] = None,
                                            opts: Optional[InvokeOptions] = None) -> Output[GetNsxtEdgegatewayBgpIpPrefixListResult]
Copy
func LookupNsxtEdgegatewayBgpIpPrefixList(ctx *Context, args *LookupNsxtEdgegatewayBgpIpPrefixListArgs, opts ...InvokeOption) (*LookupNsxtEdgegatewayBgpIpPrefixListResult, error)
func LookupNsxtEdgegatewayBgpIpPrefixListOutput(ctx *Context, args *LookupNsxtEdgegatewayBgpIpPrefixListOutputArgs, opts ...InvokeOption) LookupNsxtEdgegatewayBgpIpPrefixListResultOutput
Copy

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

public static class GetNsxtEdgegatewayBgpIpPrefixList 
{
    public static Task<GetNsxtEdgegatewayBgpIpPrefixListResult> InvokeAsync(GetNsxtEdgegatewayBgpIpPrefixListArgs args, InvokeOptions? opts = null)
    public static Output<GetNsxtEdgegatewayBgpIpPrefixListResult> Invoke(GetNsxtEdgegatewayBgpIpPrefixListInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNsxtEdgegatewayBgpIpPrefixListResult> getNsxtEdgegatewayBgpIpPrefixList(GetNsxtEdgegatewayBgpIpPrefixListArgs args, InvokeOptions options)
public static Output<GetNsxtEdgegatewayBgpIpPrefixListResult> getNsxtEdgegatewayBgpIpPrefixList(GetNsxtEdgegatewayBgpIpPrefixListArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vcd:index/getNsxtEdgegatewayBgpIpPrefixList:getNsxtEdgegatewayBgpIpPrefixList
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EdgeGatewayId This property is required. string
An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
Name This property is required. string
A name of existing BGP IP Prefix List in specified Edge Gateway
Id string
Org string
The name of organization to which the edge gateway belongs. Optional if defined at provider level.
EdgeGatewayId This property is required. string
An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
Name This property is required. string
A name of existing BGP IP Prefix List in specified Edge Gateway
Id string
Org string
The name of organization to which the edge gateway belongs. Optional if defined at provider level.
edgeGatewayId This property is required. String
An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
name This property is required. String
A name of existing BGP IP Prefix List in specified Edge Gateway
id String
org String
The name of organization to which the edge gateway belongs. Optional if defined at provider level.
edgeGatewayId This property is required. string
An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
name This property is required. string
A name of existing BGP IP Prefix List in specified Edge Gateway
id string
org string
The name of organization to which the edge gateway belongs. Optional if defined at provider level.
edge_gateway_id This property is required. str
An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
name This property is required. str
A name of existing BGP IP Prefix List in specified Edge Gateway
id str
org str
The name of organization to which the edge gateway belongs. Optional if defined at provider level.
edgeGatewayId This property is required. String
An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
name This property is required. String
A name of existing BGP IP Prefix List in specified Edge Gateway
id String
org String
The name of organization to which the edge gateway belongs. Optional if defined at provider level.

getNsxtEdgegatewayBgpIpPrefixList Result

The following output properties are available:

Supporting Types

GetNsxtEdgegatewayBgpIpPrefixListIpPrefix

Action This property is required. string
GreaterThanOrEqualTo This property is required. double
LessThanOrEqualTo This property is required. double
Network This property is required. string
Action This property is required. string
GreaterThanOrEqualTo This property is required. float64
LessThanOrEqualTo This property is required. float64
Network This property is required. string
action This property is required. String
greaterThanOrEqualTo This property is required. Double
lessThanOrEqualTo This property is required. Double
network This property is required. String
action This property is required. string
greaterThanOrEqualTo This property is required. number
lessThanOrEqualTo This property is required. number
network This property is required. string
action This property is required. str
greater_than_or_equal_to This property is required. float
less_than_or_equal_to This property is required. float
network This property is required. str
action This property is required. String
greaterThanOrEqualTo This property is required. Number
lessThanOrEqualTo This property is required. Number
network 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.