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",
});
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")
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
})
}
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",
});
});
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());
}
}
variables:
relayConfig:
fn::invoke:
function: vcd:getNsxvDhcpRelay
arguments:
edgeGateway: my-edge-gw
org: my-org
vdc: my-org-vdc
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>
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]
func LookupNsxvDhcpRelay(ctx *Context, args *LookupNsxvDhcpRelayArgs, opts ...InvokeOption) (*LookupNsxvDhcpRelayResult, error)
func LookupNsxvDhcpRelayOutput(ctx *Context, args *LookupNsxvDhcpRelayOutputArgs, opts ...InvokeOption) LookupNsxvDhcpRelayResultOutput
> 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)
}
public static CompletableFuture<GetNsxvDhcpRelayResult> getNsxvDhcpRelay(GetNsxvDhcpRelayArgs args, InvokeOptions options)
public static Output<GetNsxvDhcpRelayResult> getNsxvDhcpRelay(GetNsxvDhcpRelayArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getNsxvDhcpRelay:getNsxvDhcpRelay
arguments:
# arguments dictionary
The following arguments are supported:
- Edge
Gateway 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 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 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 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 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.
- edge
Gateway 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:
- Domain
Names List<string> - Edge
Gateway string - Id string
- Ip
Addresses List<string> - Ip
Sets List<string> - Relay
Agents List<GetNsxv Dhcp Relay Relay Agent> - Org string
- Vdc string
- Domain
Names []string - Edge
Gateway string - Id string
- Ip
Addresses []string - Ip
Sets []string - Relay
Agents []GetNsxv Dhcp Relay Relay Agent - Org string
- Vdc string
- domain
Names List<String> - edge
Gateway String - id String
- ip
Addresses List<String> - ip
Sets List<String> - relay
Agents List<GetNsxv Dhcp Relay Relay Agent> - org String
- vdc String
- domain
Names string[] - edge
Gateway string - id string
- ip
Addresses string[] - ip
Sets string[] - relay
Agents GetNsxv Dhcp Relay Relay Agent[] - org string
- vdc string
- domain_
names Sequence[str] - edge_
gateway str - id str
- ip_
addresses Sequence[str] - ip_
sets Sequence[str] - relay_
agents Sequence[GetNsxv Dhcp Relay Relay Agent] - org str
- vdc str
- domain
Names List<String> - edge
Gateway String - id String
- ip
Addresses List<String> - ip
Sets List<String> - relay
Agents List<Property Map> - org String
- vdc String
Supporting Types
GetNsxvDhcpRelayRelayAgent
- Gateway
Ip stringAddress - Network
Name string
- Gateway
Ip stringAddress - Network
Name string
- gateway
Ip StringAddress - network
Name String
- gateway
Ip stringAddress - network
Name string
- gateway_
ip_ straddress - network_
name str
- gateway
Ip StringAddress - network
Name String
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.