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

vcd.getNsxtEdgegatewayBgpConfiguration

Explore with Pulumi AI

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    Provides a data source to read BGP configuration on NSX-T Edge Gateway that has a dedicated Tier-0 Gateway or VRF. BGP makes core routing decisions by using a table of IP networks, or prefixes, which designate multiple routes between autonomous systems (AS).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const nsxt_vdc = vcd.getOrgVdc({
        org: "my-org",
        name: "my-vdc",
    });
    const existing = nsxt_vdc.then(nsxt_vdc => vcd.getNsxtEdgegateway({
        org: "my-org",
        ownerId: nsxt_vdc.id,
        name: "main",
    }));
    const testing = existing.then(existing => vcd.getNsxtEdgegatewayBgpConfiguration({
        org: "my-org",
        edgeGatewayId: existing.id,
    }));
    
    import pulumi
    import pulumi_vcd as vcd
    
    nsxt_vdc = vcd.get_org_vdc(org="my-org",
        name="my-vdc")
    existing = vcd.get_nsxt_edgegateway(org="my-org",
        owner_id=nsxt_vdc.id,
        name="main")
    testing = vcd.get_nsxt_edgegateway_bgp_configuration(org="my-org",
        edge_gateway_id=existing.id)
    
    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 {
    		nsxt_vdc, err := vcd.LookupOrgVdc(ctx, &vcd.LookupOrgVdcArgs{
    			Org:  pulumi.StringRef("my-org"),
    			Name: "my-vdc",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		existing, err := vcd.LookupNsxtEdgegateway(ctx, &vcd.LookupNsxtEdgegatewayArgs{
    			Org:     pulumi.StringRef("my-org"),
    			OwnerId: pulumi.StringRef(nsxt_vdc.Id),
    			Name:    "main",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vcd.LookupNsxtEdgegatewayBgpConfiguration(ctx, &vcd.LookupNsxtEdgegatewayBgpConfigurationArgs{
    			Org:           pulumi.StringRef("my-org"),
    			EdgeGatewayId: existing.Id,
    		}, 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 nsxt_vdc = Vcd.GetOrgVdc.Invoke(new()
        {
            Org = "my-org",
            Name = "my-vdc",
        });
    
        var existing = Vcd.GetNsxtEdgegateway.Invoke(new()
        {
            Org = "my-org",
            OwnerId = nsxt_vdc.Apply(getOrgVdcResult => getOrgVdcResult.Id),
            Name = "main",
        });
    
        var testing = Vcd.GetNsxtEdgegatewayBgpConfiguration.Invoke(new()
        {
            Org = "my-org",
            EdgeGatewayId = existing.Apply(getNsxtEdgegatewayResult => getNsxtEdgegatewayResult.Id),
        });
    
    });
    
    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.GetOrgVdcArgs;
    import com.pulumi.vcd.inputs.GetNsxtEdgegatewayArgs;
    import com.pulumi.vcd.inputs.GetNsxtEdgegatewayBgpConfigurationArgs;
    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 nsxt-vdc = VcdFunctions.getOrgVdc(GetOrgVdcArgs.builder()
                .org("my-org")
                .name("my-vdc")
                .build());
    
            final var existing = VcdFunctions.getNsxtEdgegateway(GetNsxtEdgegatewayArgs.builder()
                .org("my-org")
                .ownerId(nsxt_vdc.id())
                .name("main")
                .build());
    
            final var testing = VcdFunctions.getNsxtEdgegatewayBgpConfiguration(GetNsxtEdgegatewayBgpConfigurationArgs.builder()
                .org("my-org")
                .edgeGatewayId(existing.applyValue(getNsxtEdgegatewayResult -> getNsxtEdgegatewayResult.id()))
                .build());
    
        }
    }
    
    variables:
      nsxt-vdc:
        fn::invoke:
          function: vcd:getOrgVdc
          arguments:
            org: my-org
            name: my-vdc
      existing:
        fn::invoke:
          function: vcd:getNsxtEdgegateway
          arguments:
            org: my-org
            ownerId: ${["nsxt-vdc"].id}
            name: main
      testing:
        fn::invoke:
          function: vcd:getNsxtEdgegatewayBgpConfiguration
          arguments:
            org: my-org
            edgeGatewayId: ${existing.id}
    

    Using getNsxtEdgegatewayBgpConfiguration

    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 getNsxtEdgegatewayBgpConfiguration(args: GetNsxtEdgegatewayBgpConfigurationArgs, opts?: InvokeOptions): Promise<GetNsxtEdgegatewayBgpConfigurationResult>
    function getNsxtEdgegatewayBgpConfigurationOutput(args: GetNsxtEdgegatewayBgpConfigurationOutputArgs, opts?: InvokeOptions): Output<GetNsxtEdgegatewayBgpConfigurationResult>
    def get_nsxt_edgegateway_bgp_configuration(edge_gateway_id: Optional[str] = None,
                                               id: Optional[str] = None,
                                               org: Optional[str] = None,
                                               opts: Optional[InvokeOptions] = None) -> GetNsxtEdgegatewayBgpConfigurationResult
    def get_nsxt_edgegateway_bgp_configuration_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[GetNsxtEdgegatewayBgpConfigurationResult]
    func LookupNsxtEdgegatewayBgpConfiguration(ctx *Context, args *LookupNsxtEdgegatewayBgpConfigurationArgs, opts ...InvokeOption) (*LookupNsxtEdgegatewayBgpConfigurationResult, error)
    func LookupNsxtEdgegatewayBgpConfigurationOutput(ctx *Context, args *LookupNsxtEdgegatewayBgpConfigurationOutputArgs, opts ...InvokeOption) LookupNsxtEdgegatewayBgpConfigurationResultOutput

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

    public static class GetNsxtEdgegatewayBgpConfiguration 
    {
        public static Task<GetNsxtEdgegatewayBgpConfigurationResult> InvokeAsync(GetNsxtEdgegatewayBgpConfigurationArgs args, InvokeOptions? opts = null)
        public static Output<GetNsxtEdgegatewayBgpConfigurationResult> Invoke(GetNsxtEdgegatewayBgpConfigurationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNsxtEdgegatewayBgpConfigurationResult> getNsxtEdgegatewayBgpConfiguration(GetNsxtEdgegatewayBgpConfigurationArgs args, InvokeOptions options)
    public static Output<GetNsxtEdgegatewayBgpConfigurationResult> getNsxtEdgegatewayBgpConfiguration(GetNsxtEdgegatewayBgpConfigurationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getNsxtEdgegatewayBgpConfiguration:getNsxtEdgegatewayBgpConfiguration
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EdgeGatewayId string
    An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
    Id string
    Org string
    The name of organization to which the edge gateway belongs. Optional if defined at provider level.
    EdgeGatewayId string
    An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
    Id string
    Org string
    The name of organization to which the edge gateway belongs. Optional if defined at provider level.
    edgeGatewayId String
    An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
    id String
    org String
    The name of organization to which the edge gateway belongs. Optional if defined at provider level.
    edgeGatewayId string
    An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
    id string
    org string
    The name of organization to which the edge gateway belongs. Optional if defined at provider level.
    edge_gateway_id str
    An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
    id str
    org str
    The name of organization to which the edge gateway belongs. Optional if defined at provider level.
    edgeGatewayId String
    An ID of NSX-T Edge Gateway. Can be looked up using vcd.NsxtEdgegateway data source
    id String
    org String
    The name of organization to which the edge gateway belongs. Optional if defined at provider level.

    getNsxtEdgegatewayBgpConfiguration Result

    The following output properties are available:

    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