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

vcd.getNsxvDhcpRelay

Explore with Pulumi AI

Provides a VMware Cloud Director Edge Gateway DHCP relay configuration data source. The DHCP relay capability provided by NSX in VMware Cloud Director environment allows to leverage existing DHCP infrastructure from within VMware Cloud Director environment without any interruption to the IP address management in existing DHCP infrastructure. DHCP messages are relayed from virtual machines to the designated DHCP servers in your physical DHCP infrastructure, which allows IP addresses controlled by the NSX software to continue to be in sync with IP addresses in the rest of your DHCP-controlled environments.

Supported in provider v2.6+

Example Usage

1

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

const relayConfig = vcd.getNsxvDhcpRelay({
    edgeGateway: "my-edge-gw",
    org: "my-org",
    vdc: "my-org-vdc",
});
Copy
import pulumi
import pulumi_vcd as vcd

relay_config = vcd.get_nsxv_dhcp_relay(edge_gateway="my-edge-gw",
    org="my-org",
    vdc="my-org-vdc")
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 {
		_, err := vcd.LookupNsxvDhcpRelay(ctx, &vcd.LookupNsxvDhcpRelayArgs{
			EdgeGateway: "my-edge-gw",
			Org:         pulumi.StringRef("my-org"),
			Vdc:         pulumi.StringRef("my-org-vdc"),
		}, 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 relayConfig = Vcd.GetNsxvDhcpRelay.Invoke(new()
    {
        EdgeGateway = "my-edge-gw",
        Org = "my-org",
        Vdc = "my-org-vdc",
    });

});
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.GetNsxvDhcpRelayArgs;
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 relayConfig = VcdFunctions.getNsxvDhcpRelay(GetNsxvDhcpRelayArgs.builder()
            .edgeGateway("my-edge-gw")
            .org("my-org")
            .vdc("my-org-vdc")
            .build());

    }
}
Copy
variables:
  relayConfig:
    fn::invoke:
      function: vcd:getNsxvDhcpRelay
      arguments:
        edgeGateway: my-edge-gw
        org: my-org
        vdc: my-org-vdc
Copy

Using getNsxvDhcpRelay

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 getNsxvDhcpRelay(args: GetNsxvDhcpRelayArgs, opts?: InvokeOptions): Promise<GetNsxvDhcpRelayResult>
function getNsxvDhcpRelayOutput(args: GetNsxvDhcpRelayOutputArgs, opts?: InvokeOptions): Output<GetNsxvDhcpRelayResult>
Copy
def get_nsxv_dhcp_relay(edge_gateway: Optional[str] = None,
                        id: Optional[str] = None,
                        org: Optional[str] = None,
                        vdc: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetNsxvDhcpRelayResult
def get_nsxv_dhcp_relay_output(edge_gateway: Optional[pulumi.Input[str]] = None,
                        id: Optional[pulumi.Input[str]] = None,
                        org: Optional[pulumi.Input[str]] = None,
                        vdc: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetNsxvDhcpRelayResult]
Copy
func LookupNsxvDhcpRelay(ctx *Context, args *LookupNsxvDhcpRelayArgs, opts ...InvokeOption) (*LookupNsxvDhcpRelayResult, error)
func LookupNsxvDhcpRelayOutput(ctx *Context, args *LookupNsxvDhcpRelayOutputArgs, opts ...InvokeOption) LookupNsxvDhcpRelayResultOutput
Copy

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

public static class GetNsxvDhcpRelay 
{
    public static Task<GetNsxvDhcpRelayResult> InvokeAsync(GetNsxvDhcpRelayArgs args, InvokeOptions? opts = null)
    public static Output<GetNsxvDhcpRelayResult> Invoke(GetNsxvDhcpRelayInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNsxvDhcpRelayResult> getNsxvDhcpRelay(GetNsxvDhcpRelayArgs args, InvokeOptions options)
public static Output<GetNsxvDhcpRelayResult> getNsxvDhcpRelay(GetNsxvDhcpRelayArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vcd:index/getNsxvDhcpRelay:getNsxvDhcpRelay
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EdgeGateway This property is required. string
The name of the edge gateway on which DHCP relay is to be configured.
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.
Vdc string
The name of VDC to use, optional if defined at provider level.
EdgeGateway This property is required. string
The name of the edge gateway on which DHCP relay is to be configured.
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.
Vdc string
The name of VDC to use, optional if defined at provider level.
edgeGateway This property is required. String
The name of the edge gateway on which DHCP relay is to be configured.
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.
vdc String
The name of VDC to use, optional if defined at provider level.
edgeGateway This property is required. string
The name of the edge gateway on which DHCP relay is to be configured.
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.
vdc string
The name of VDC to use, optional if defined at provider level.
edge_gateway This property is required. str
The name of the edge gateway on which DHCP relay is to be configured.
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.
vdc str
The name of VDC to use, optional if defined at provider level.
edgeGateway This property is required. String
The name of the edge gateway on which DHCP relay is to be configured.
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.
vdc String
The name of VDC to use, optional if defined at provider level.

getNsxvDhcpRelay Result

The following output properties are available:

DomainNames List<string>
EdgeGateway string
Id string
IpAddresses List<string>
IpSets List<string>
RelayAgents List<GetNsxvDhcpRelayRelayAgent>
Org string
Vdc string
domainNames List<String>
edgeGateway String
id String
ipAddresses List<String>
ipSets List<String>
relayAgents List<GetNsxvDhcpRelayRelayAgent>
org String
vdc String
domainNames List<String>
edgeGateway String
id String
ipAddresses List<String>
ipSets List<String>
relayAgents List<Property Map>
org String
vdc String

Supporting Types

GetNsxvDhcpRelayRelayAgent

GatewayIpAddress This property is required. string
NetworkName This property is required. string
GatewayIpAddress This property is required. string
NetworkName This property is required. string
gatewayIpAddress This property is required. String
networkName This property is required. String
gatewayIpAddress This property is required. string
networkName This property is required. string
gateway_ip_address This property is required. str
network_name This property is required. str
gatewayIpAddress This property is required. String
networkName 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.