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

vcd.getNsxtEdgegatewayDhcpForwarding

Start a Neo task
Explain and create a vcd.getNsxtEdgegatewayDhcpForwarding resource
vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    Supported in provider v3.10+ and VCD 10.3.1+ with NSX-T.

    Provides a data source to read NSX-T Edge Gateway DHCP forwarding configuration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const v1 = vcd.getOrgVdc({
        org: "datacloud",
        name: "nsxt-vdc-datacloud",
    });
    const testing_in_vdcNsxtEdgegateway = v1.then(v1 => vcd.getNsxtEdgegateway({
        org: "datacloud",
        ownerId: v1.id,
        name: "nsxt-gw-datacloud",
    }));
    const testing_in_vdcNsxtEdgegatewayDhcpForwarding = testing_in_vdcNsxtEdgegateway.then(testing_in_vdcNsxtEdgegateway => vcd.getNsxtEdgegatewayDhcpForwarding({
        org: "datacloud",
        edgeGatewayId: testing_in_vdcNsxtEdgegateway.id,
    }));
    
    import pulumi
    import pulumi_vcd as vcd
    
    v1 = vcd.get_org_vdc(org="datacloud",
        name="nsxt-vdc-datacloud")
    testing_in_vdc_nsxt_edgegateway = vcd.get_nsxt_edgegateway(org="datacloud",
        owner_id=v1.id,
        name="nsxt-gw-datacloud")
    testing_in_vdc_nsxt_edgegateway_dhcp_forwarding = vcd.get_nsxt_edgegateway_dhcp_forwarding(org="datacloud",
        edge_gateway_id=testing_in_vdc_nsxt_edgegateway.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 {
    		v1, err := vcd.LookupOrgVdc(ctx, &vcd.LookupOrgVdcArgs{
    			Org:  pulumi.StringRef("datacloud"),
    			Name: "nsxt-vdc-datacloud",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		testing_in_vdcNsxtEdgegateway, err := vcd.LookupNsxtEdgegateway(ctx, &vcd.LookupNsxtEdgegatewayArgs{
    			Org:     pulumi.StringRef("datacloud"),
    			OwnerId: pulumi.StringRef(v1.Id),
    			Name:    "nsxt-gw-datacloud",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vcd.LookupNsxtEdgegatewayDhcpForwarding(ctx, &vcd.LookupNsxtEdgegatewayDhcpForwardingArgs{
    			Org:           pulumi.StringRef("datacloud"),
    			EdgeGatewayId: testing_in_vdcNsxtEdgegateway.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 v1 = Vcd.GetOrgVdc.Invoke(new()
        {
            Org = "datacloud",
            Name = "nsxt-vdc-datacloud",
        });
    
        var testing_in_vdcNsxtEdgegateway = Vcd.GetNsxtEdgegateway.Invoke(new()
        {
            Org = "datacloud",
            OwnerId = v1.Apply(getOrgVdcResult => getOrgVdcResult.Id),
            Name = "nsxt-gw-datacloud",
        });
    
        var testing_in_vdcNsxtEdgegatewayDhcpForwarding = Vcd.GetNsxtEdgegatewayDhcpForwarding.Invoke(new()
        {
            Org = "datacloud",
            EdgeGatewayId = testing_in_vdcNsxtEdgegateway.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.GetNsxtEdgegatewayDhcpForwardingArgs;
    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 v1 = VcdFunctions.getOrgVdc(GetOrgVdcArgs.builder()
                .org("datacloud")
                .name("nsxt-vdc-datacloud")
                .build());
    
            final var testing-in-vdcNsxtEdgegateway = VcdFunctions.getNsxtEdgegateway(GetNsxtEdgegatewayArgs.builder()
                .org("datacloud")
                .ownerId(v1.applyValue(getOrgVdcResult -> getOrgVdcResult.id()))
                .name("nsxt-gw-datacloud")
                .build());
    
            final var testing-in-vdcNsxtEdgegatewayDhcpForwarding = VcdFunctions.getNsxtEdgegatewayDhcpForwarding(GetNsxtEdgegatewayDhcpForwardingArgs.builder()
                .org("datacloud")
                .edgeGatewayId(testing_in_vdcNsxtEdgegateway.id())
                .build());
    
        }
    }
    
    variables:
      v1:
        fn::invoke:
          function: vcd:getOrgVdc
          arguments:
            org: datacloud
            name: nsxt-vdc-datacloud
      testing-in-vdcNsxtEdgegateway:
        fn::invoke:
          function: vcd:getNsxtEdgegateway
          arguments:
            org: datacloud
            ownerId: ${v1.id}
            name: nsxt-gw-datacloud
      testing-in-vdcNsxtEdgegatewayDhcpForwarding:
        fn::invoke:
          function: vcd:getNsxtEdgegatewayDhcpForwarding
          arguments:
            org: datacloud
            edgeGatewayId: ${["testing-in-vdcNsxtEdgegateway"].id}
    

    Using getNsxtEdgegatewayDhcpForwarding

    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 getNsxtEdgegatewayDhcpForwarding(args: GetNsxtEdgegatewayDhcpForwardingArgs, opts?: InvokeOptions): Promise<GetNsxtEdgegatewayDhcpForwardingResult>
    function getNsxtEdgegatewayDhcpForwardingOutput(args: GetNsxtEdgegatewayDhcpForwardingOutputArgs, opts?: InvokeOptions): Output<GetNsxtEdgegatewayDhcpForwardingResult>
    def get_nsxt_edgegateway_dhcp_forwarding(edge_gateway_id: Optional[str] = None,
                                             id: Optional[str] = None,
                                             org: Optional[str] = None,
                                             opts: Optional[InvokeOptions] = None) -> GetNsxtEdgegatewayDhcpForwardingResult
    def get_nsxt_edgegateway_dhcp_forwarding_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[GetNsxtEdgegatewayDhcpForwardingResult]
    func LookupNsxtEdgegatewayDhcpForwarding(ctx *Context, args *LookupNsxtEdgegatewayDhcpForwardingArgs, opts ...InvokeOption) (*LookupNsxtEdgegatewayDhcpForwardingResult, error)
    func LookupNsxtEdgegatewayDhcpForwardingOutput(ctx *Context, args *LookupNsxtEdgegatewayDhcpForwardingOutputArgs, opts ...InvokeOption) LookupNsxtEdgegatewayDhcpForwardingResultOutput

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

    public static class GetNsxtEdgegatewayDhcpForwarding 
    {
        public static Task<GetNsxtEdgegatewayDhcpForwardingResult> InvokeAsync(GetNsxtEdgegatewayDhcpForwardingArgs args, InvokeOptions? opts = null)
        public static Output<GetNsxtEdgegatewayDhcpForwardingResult> Invoke(GetNsxtEdgegatewayDhcpForwardingInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNsxtEdgegatewayDhcpForwardingResult> getNsxtEdgegatewayDhcpForwarding(GetNsxtEdgegatewayDhcpForwardingArgs args, InvokeOptions options)
    public static Output<GetNsxtEdgegatewayDhcpForwardingResult> getNsxtEdgegatewayDhcpForwarding(GetNsxtEdgegatewayDhcpForwardingArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getNsxtEdgegatewayDhcpForwarding:getNsxtEdgegatewayDhcpForwarding
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EdgeGatewayId string
    NSX-T Edge Gateway ID.
    Id string
    Org string
    Org in which the NSX-T Edge Gateway is located, required if not set in the provider section.
    EdgeGatewayId string
    NSX-T Edge Gateway ID.
    Id string
    Org string
    Org in which the NSX-T Edge Gateway is located, required if not set in the provider section.
    edgeGatewayId String
    NSX-T Edge Gateway ID.
    id String
    org String
    Org in which the NSX-T Edge Gateway is located, required if not set in the provider section.
    edgeGatewayId string
    NSX-T Edge Gateway ID.
    id string
    org string
    Org in which the NSX-T Edge Gateway is located, required if not set in the provider section.
    edge_gateway_id str
    NSX-T Edge Gateway ID.
    id str
    org str
    Org in which the NSX-T Edge Gateway is located, required if not set in the provider section.
    edgeGatewayId String
    NSX-T Edge Gateway ID.
    id String
    org String
    Org in which the NSX-T Edge Gateway is located, required if not set in the provider section.

    getNsxtEdgegatewayDhcpForwarding Result

    The following output properties are available:

    DhcpServers List<string>
    EdgeGatewayId string
    Enabled bool
    Id string
    Org string
    DhcpServers []string
    EdgeGatewayId string
    Enabled bool
    Id string
    Org string
    dhcpServers List<String>
    edgeGatewayId String
    enabled Boolean
    id String
    org String
    dhcpServers string[]
    edgeGatewayId string
    enabled boolean
    id string
    org string
    dhcp_servers Sequence[str]
    edge_gateway_id str
    enabled bool
    id str
    org str
    dhcpServers List<String>
    edgeGatewayId String
    enabled Boolean
    id String
    org String

    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
      Meet Neo: Your AI Platform Teammate