Viewing docs for vcd 3.14.1
published on Monday, Apr 14, 2025 by vmware
published on Monday, Apr 14, 2025 by vmware
Viewing docs for vcd 3.14.1
published on Monday, Apr 14, 2025 by vmware
published on Monday, Apr 14, 2025 by vmware
Supported in provider v3.11+ and VCD 10.4+ with NSX-T.
Provides a data source to read NSX-T Edge Gateway L2 VPN Tunnel sessions and their configurations.
Example Usage
Reading A Tunnel’s Server Session To Get The Peer Code For The Client Session)
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const existing = vcd.getOrgVdc({
name: "existing-vdc",
});
const server_testing = existing.then(existing => vcd.getNsxtEdgegateway({
ownerId: existing.id,
name: "server-testing",
}));
const client_testing = existing.then(existing => vcd.getNsxtEdgegateway({
ownerId: existing.id,
name: "client-testing",
}));
const server_session = server_testing.then(server_testing => vcd.getNsxtEdgegatewayL2VpnTunnel({
org: "datacloud",
edgeGatewayId: server_testing.id,
name: "server-session",
}));
const client_session = new vcd.NsxtEdgegatewayL2VpnTunnel("client-session", {
org: "datacloud",
edgeGatewayId: client_testing.then(client_testing => client_testing.id),
sessionMode: "CLIENT",
enabled: true,
localEndpointIp: "101.22.30.3",
remoteEndpointIp: "1.2.2.3",
peerCode: server_session.then(server_session => server_session.peerCode),
});
import pulumi
import pulumi_vcd as vcd
existing = vcd.get_org_vdc(name="existing-vdc")
server_testing = vcd.get_nsxt_edgegateway(owner_id=existing.id,
name="server-testing")
client_testing = vcd.get_nsxt_edgegateway(owner_id=existing.id,
name="client-testing")
server_session = vcd.get_nsxt_edgegateway_l2_vpn_tunnel(org="datacloud",
edge_gateway_id=server_testing.id,
name="server-session")
client_session = vcd.NsxtEdgegatewayL2VpnTunnel("client-session",
org="datacloud",
edge_gateway_id=client_testing.id,
session_mode="CLIENT",
enabled=True,
local_endpoint_ip="101.22.30.3",
remote_endpoint_ip="1.2.2.3",
peer_code=server_session.peer_code)
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 {
existing, err := vcd.LookupOrgVdc(ctx, &vcd.LookupOrgVdcArgs{
Name: "existing-vdc",
}, nil)
if err != nil {
return err
}
server_testing, err := vcd.LookupNsxtEdgegateway(ctx, &vcd.LookupNsxtEdgegatewayArgs{
OwnerId: pulumi.StringRef(existing.Id),
Name: "server-testing",
}, nil)
if err != nil {
return err
}
client_testing, err := vcd.LookupNsxtEdgegateway(ctx, &vcd.LookupNsxtEdgegatewayArgs{
OwnerId: pulumi.StringRef(existing.Id),
Name: "client-testing",
}, nil)
if err != nil {
return err
}
server_session, err := vcd.LookupNsxtEdgegatewayL2VpnTunnel(ctx, &vcd.LookupNsxtEdgegatewayL2VpnTunnelArgs{
Org: pulumi.StringRef("datacloud"),
EdgeGatewayId: server_testing.Id,
Name: "server-session",
}, nil)
if err != nil {
return err
}
_, err = vcd.NewNsxtEdgegatewayL2VpnTunnel(ctx, "client-session", &vcd.NsxtEdgegatewayL2VpnTunnelArgs{
Org: pulumi.String("datacloud"),
EdgeGatewayId: pulumi.String(client_testing.Id),
SessionMode: pulumi.String("CLIENT"),
Enabled: pulumi.Bool(true),
LocalEndpointIp: pulumi.String("101.22.30.3"),
RemoteEndpointIp: pulumi.String("1.2.2.3"),
PeerCode: pulumi.String(server_session.PeerCode),
})
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 existing = Vcd.GetOrgVdc.Invoke(new()
{
Name = "existing-vdc",
});
var server_testing = Vcd.GetNsxtEdgegateway.Invoke(new()
{
OwnerId = existing.Apply(getOrgVdcResult => getOrgVdcResult.Id),
Name = "server-testing",
});
var client_testing = Vcd.GetNsxtEdgegateway.Invoke(new()
{
OwnerId = existing.Apply(getOrgVdcResult => getOrgVdcResult.Id),
Name = "client-testing",
});
var server_session = Vcd.GetNsxtEdgegatewayL2VpnTunnel.Invoke(new()
{
Org = "datacloud",
EdgeGatewayId = server_testing.Apply(getNsxtEdgegatewayResult => getNsxtEdgegatewayResult.Id),
Name = "server-session",
});
var client_session = new Vcd.NsxtEdgegatewayL2VpnTunnel("client-session", new()
{
Org = "datacloud",
EdgeGatewayId = client_testing.Apply(client_testing => client_testing.Apply(getNsxtEdgegatewayResult => getNsxtEdgegatewayResult.Id)),
SessionMode = "CLIENT",
Enabled = true,
LocalEndpointIp = "101.22.30.3",
RemoteEndpointIp = "1.2.2.3",
PeerCode = server_session.Apply(server_session => server_session.Apply(getNsxtEdgegatewayL2VpnTunnelResult => getNsxtEdgegatewayL2VpnTunnelResult.PeerCode)),
});
});
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.GetNsxtEdgegatewayL2VpnTunnelArgs;
import com.pulumi.vcd.NsxtEdgegatewayL2VpnTunnel;
import com.pulumi.vcd.NsxtEdgegatewayL2VpnTunnelArgs;
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 existing = VcdFunctions.getOrgVdc(GetOrgVdcArgs.builder()
.name("existing-vdc")
.build());
final var server-testing = VcdFunctions.getNsxtEdgegateway(GetNsxtEdgegatewayArgs.builder()
.ownerId(existing.applyValue(getOrgVdcResult -> getOrgVdcResult.id()))
.name("server-testing")
.build());
final var client-testing = VcdFunctions.getNsxtEdgegateway(GetNsxtEdgegatewayArgs.builder()
.ownerId(existing.applyValue(getOrgVdcResult -> getOrgVdcResult.id()))
.name("client-testing")
.build());
final var server-session = VcdFunctions.getNsxtEdgegatewayL2VpnTunnel(GetNsxtEdgegatewayL2VpnTunnelArgs.builder()
.org("datacloud")
.edgeGatewayId(server_testing.id())
.name("server-session")
.build());
var client_session = new NsxtEdgegatewayL2VpnTunnel("client-session", NsxtEdgegatewayL2VpnTunnelArgs.builder()
.org("datacloud")
.edgeGatewayId(client_testing.id())
.sessionMode("CLIENT")
.enabled(true)
.localEndpointIp("101.22.30.3")
.remoteEndpointIp("1.2.2.3")
.peerCode(server_session.peerCode())
.build());
}
}
resources:
client-session:
type: vcd:NsxtEdgegatewayL2VpnTunnel
properties:
org: datacloud
# Note that this is a different Edge Gateway, as one Edge Gateway
# # can function only in SERVER or CLIENT mode
edgeGatewayId: ${["client-testing"].id}
sessionMode: CLIENT
enabled: true
# must be sub-allocated on the Edge Gateway
localEndpointIp: 101.22.30.3
remoteEndpointIp: 1.2.2.3
peerCode: ${["server-session"].peerCode}
variables:
existing:
fn::invoke:
function: vcd:getOrgVdc
arguments:
name: existing-vdc
server-testing:
fn::invoke:
function: vcd:getNsxtEdgegateway
arguments:
ownerId: ${existing.id}
name: server-testing
client-testing:
fn::invoke:
function: vcd:getNsxtEdgegateway
arguments:
ownerId: ${existing.id}
name: client-testing
server-session:
fn::invoke:
function: vcd:getNsxtEdgegatewayL2VpnTunnel
arguments:
org: datacloud
edgeGatewayId: ${["server-testing"].id}
name: server-session
Using getNsxtEdgegatewayL2VpnTunnel
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 getNsxtEdgegatewayL2VpnTunnel(args: GetNsxtEdgegatewayL2VpnTunnelArgs, opts?: InvokeOptions): Promise<GetNsxtEdgegatewayL2VpnTunnelResult>
function getNsxtEdgegatewayL2VpnTunnelOutput(args: GetNsxtEdgegatewayL2VpnTunnelOutputArgs, opts?: InvokeOptions): Output<GetNsxtEdgegatewayL2VpnTunnelResult>def get_nsxt_edgegateway_l2_vpn_tunnel(edge_gateway_id: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
org: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNsxtEdgegatewayL2VpnTunnelResult
def get_nsxt_edgegateway_l2_vpn_tunnel_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[GetNsxtEdgegatewayL2VpnTunnelResult]func LookupNsxtEdgegatewayL2VpnTunnel(ctx *Context, args *LookupNsxtEdgegatewayL2VpnTunnelArgs, opts ...InvokeOption) (*LookupNsxtEdgegatewayL2VpnTunnelResult, error)
func LookupNsxtEdgegatewayL2VpnTunnelOutput(ctx *Context, args *LookupNsxtEdgegatewayL2VpnTunnelOutputArgs, opts ...InvokeOption) LookupNsxtEdgegatewayL2VpnTunnelResultOutput> Note: This function is named LookupNsxtEdgegatewayL2VpnTunnel in the Go SDK.
public static class GetNsxtEdgegatewayL2VpnTunnel
{
public static Task<GetNsxtEdgegatewayL2VpnTunnelResult> InvokeAsync(GetNsxtEdgegatewayL2VpnTunnelArgs args, InvokeOptions? opts = null)
public static Output<GetNsxtEdgegatewayL2VpnTunnelResult> Invoke(GetNsxtEdgegatewayL2VpnTunnelInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNsxtEdgegatewayL2VpnTunnelResult> getNsxtEdgegatewayL2VpnTunnel(GetNsxtEdgegatewayL2VpnTunnelArgs args, InvokeOptions options)
public static Output<GetNsxtEdgegatewayL2VpnTunnelResult> getNsxtEdgegatewayL2VpnTunnel(GetNsxtEdgegatewayL2VpnTunnelArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getNsxtEdgegatewayL2VpnTunnel:getNsxtEdgegatewayL2VpnTunnel
arguments:
# arguments dictionaryThe following arguments are supported:
- Edge
Gateway stringId - The ID of the Edge Gateway (NSX-T only).
Can be looked up using
vcd.NsxtEdgegatewaydata source - Name string
- The name of the tunnel.
- Id string
- Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
- Edge
Gateway stringId - The ID of the Edge Gateway (NSX-T only).
Can be looked up using
vcd.NsxtEdgegatewaydata source - Name string
- The name of the tunnel.
- Id string
- Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
- edge
Gateway StringId - The ID of the Edge Gateway (NSX-T only).
Can be looked up using
vcd.NsxtEdgegatewaydata source - name String
- The name of the tunnel.
- id String
- org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
- edge
Gateway stringId - The ID of the Edge Gateway (NSX-T only).
Can be looked up using
vcd.NsxtEdgegatewaydata source - name string
- The name of the tunnel.
- id string
- org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
- edge_
gateway_ strid - The ID of the Edge Gateway (NSX-T only).
Can be looked up using
vcd.NsxtEdgegatewaydata source - name str
- The name of the tunnel.
- id str
- org str
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
- edge
Gateway StringId - The ID of the Edge Gateway (NSX-T only).
Can be looked up using
vcd.NsxtEdgegatewaydata source - name String
- The name of the tunnel.
- id String
- org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations
getNsxtEdgegatewayL2VpnTunnel Result
The following output properties are available:
- Connector
Initiation stringMode - Description string
- Edge
Gateway stringId - Enabled bool
- Id string
- Local
Endpoint stringIp - Name string
- Peer
Code string - string
- Remote
Endpoint stringIp - Session
Mode string - Stretched
Networks List<GetNsxt Edgegateway L2Vpn Tunnel Stretched Network> - Tunnel
Interface string - Org string
- Connector
Initiation stringMode - Description string
- Edge
Gateway stringId - Enabled bool
- Id string
- Local
Endpoint stringIp - Name string
- Peer
Code string - string
- Remote
Endpoint stringIp - Session
Mode string - Stretched
Networks []GetNsxt Edgegateway L2Vpn Tunnel Stretched Network - Tunnel
Interface string - Org string
- connector
Initiation StringMode - description String
- edge
Gateway StringId - enabled Boolean
- id String
- local
Endpoint StringIp - name String
- peer
Code String - String
- remote
Endpoint StringIp - session
Mode String - stretched
Networks List<GetNsxt Edgegateway L2Vpn Tunnel Stretched Network> - tunnel
Interface String - org String
- connector
Initiation stringMode - description string
- edge
Gateway stringId - enabled boolean
- id string
- local
Endpoint stringIp - name string
- peer
Code string - string
- remote
Endpoint stringIp - session
Mode string - stretched
Networks GetNsxt Edgegateway L2Vpn Tunnel Stretched Network[] - tunnel
Interface string - org string
- connector_
initiation_ strmode - description str
- edge_
gateway_ strid - enabled bool
- id str
- local_
endpoint_ strip - name str
- peer_
code str - str
- remote_
endpoint_ strip - session_
mode str - stretched_
networks Sequence[GetNsxt Edgegateway L2Vpn Tunnel Stretched Network] - tunnel_
interface str - org str
- connector
Initiation StringMode - description String
- edge
Gateway StringId - enabled Boolean
- id String
- local
Endpoint StringIp - name String
- peer
Code String - String
- remote
Endpoint StringIp - session
Mode String - stretched
Networks List<Property Map> - tunnel
Interface String - org String
Supporting Types
GetNsxtEdgegatewayL2VpnTunnelStretchedNetwork
- network_
id str - tunnel_
id float
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcdTerraform Provider.
Viewing docs for vcd 3.14.1
published on Monday, Apr 14, 2025 by vmware
published on Monday, Apr 14, 2025 by vmware
