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

vcd.getNsxtEdgegatewayDns

Explore with Pulumi AI

vcd logo
vcd 3.14.1 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 DNS forwarder configuration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const existing = vcd.getOrgVdc({
        name: "existing-vdc",
    });
    const testing = existing.then(existing => vcd.getNsxtEdgegateway({
        ownerId: existing.id,
        name: "server-testing",
    }));
    const dns_service = testing.then(testing => vcd.getNsxtEdgegatewayDns({
        org: "datacloud",
        edgeGatewayId: testing.id,
    }));
    
    import pulumi
    import pulumi_vcd as vcd
    
    existing = vcd.get_org_vdc(name="existing-vdc")
    testing = vcd.get_nsxt_edgegateway(owner_id=existing.id,
        name="server-testing")
    dns_service = vcd.get_nsxt_edgegateway_dns(org="datacloud",
        edge_gateway_id=testing.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 {
    		existing, err := vcd.LookupOrgVdc(ctx, &vcd.LookupOrgVdcArgs{
    			Name: "existing-vdc",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		testing, err := vcd.LookupNsxtEdgegateway(ctx, &vcd.LookupNsxtEdgegatewayArgs{
    			OwnerId: pulumi.StringRef(existing.Id),
    			Name:    "server-testing",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vcd.LookupNsxtEdgegatewayDns(ctx, &vcd.LookupNsxtEdgegatewayDnsArgs{
    			Org:           pulumi.StringRef("datacloud"),
    			EdgeGatewayId: testing.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 existing = Vcd.GetOrgVdc.Invoke(new()
        {
            Name = "existing-vdc",
        });
    
        var testing = Vcd.GetNsxtEdgegateway.Invoke(new()
        {
            OwnerId = existing.Apply(getOrgVdcResult => getOrgVdcResult.Id),
            Name = "server-testing",
        });
    
        var dns_service = Vcd.GetNsxtEdgegatewayDns.Invoke(new()
        {
            Org = "datacloud",
            EdgeGatewayId = testing.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.GetNsxtEdgegatewayDnsArgs;
    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 testing = VcdFunctions.getNsxtEdgegateway(GetNsxtEdgegatewayArgs.builder()
                .ownerId(existing.applyValue(getOrgVdcResult -> getOrgVdcResult.id()))
                .name("server-testing")
                .build());
    
            final var dns-service = VcdFunctions.getNsxtEdgegatewayDns(GetNsxtEdgegatewayDnsArgs.builder()
                .org("datacloud")
                .edgeGatewayId(testing.applyValue(getNsxtEdgegatewayResult -> getNsxtEdgegatewayResult.id()))
                .build());
    
        }
    }
    
    variables:
      existing:
        fn::invoke:
          function: vcd:getOrgVdc
          arguments:
            name: existing-vdc
      testing:
        fn::invoke:
          function: vcd:getNsxtEdgegateway
          arguments:
            ownerId: ${existing.id}
            name: server-testing
      dns-service:
        fn::invoke:
          function: vcd:getNsxtEdgegatewayDns
          arguments:
            org: datacloud
            edgeGatewayId: ${testing.id}
    

    Using getNsxtEdgegatewayDns

    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 getNsxtEdgegatewayDns(args: GetNsxtEdgegatewayDnsArgs, opts?: InvokeOptions): Promise<GetNsxtEdgegatewayDnsResult>
    function getNsxtEdgegatewayDnsOutput(args: GetNsxtEdgegatewayDnsOutputArgs, opts?: InvokeOptions): Output<GetNsxtEdgegatewayDnsResult>
    def get_nsxt_edgegateway_dns(edge_gateway_id: Optional[str] = None,
                                 id: Optional[str] = None,
                                 org: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetNsxtEdgegatewayDnsResult
    def get_nsxt_edgegateway_dns_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[GetNsxtEdgegatewayDnsResult]
    func LookupNsxtEdgegatewayDns(ctx *Context, args *LookupNsxtEdgegatewayDnsArgs, opts ...InvokeOption) (*LookupNsxtEdgegatewayDnsResult, error)
    func LookupNsxtEdgegatewayDnsOutput(ctx *Context, args *LookupNsxtEdgegatewayDnsOutputArgs, opts ...InvokeOption) LookupNsxtEdgegatewayDnsResultOutput

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

    public static class GetNsxtEdgegatewayDns 
    {
        public static Task<GetNsxtEdgegatewayDnsResult> InvokeAsync(GetNsxtEdgegatewayDnsArgs args, InvokeOptions? opts = null)
        public static Output<GetNsxtEdgegatewayDnsResult> Invoke(GetNsxtEdgegatewayDnsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNsxtEdgegatewayDnsResult> getNsxtEdgegatewayDns(GetNsxtEdgegatewayDnsArgs args, InvokeOptions options)
    public static Output<GetNsxtEdgegatewayDnsResult> getNsxtEdgegatewayDns(GetNsxtEdgegatewayDnsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getNsxtEdgegatewayDns:getNsxtEdgegatewayDns
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EdgeGatewayId string
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    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
    EdgeGatewayId string
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    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
    edgeGatewayId String
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    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
    edgeGatewayId string
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    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_id str
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    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
    edgeGatewayId String
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    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

    getNsxtEdgegatewayDns Result

    The following output properties are available:

    Supporting Types

    GetNsxtEdgegatewayDnsConditionalForwarderZone

    DomainNames List<string>
    Id string
    Name string
    UpstreamServers List<string>
    DomainNames []string
    Id string
    Name string
    UpstreamServers []string
    domainNames List<String>
    id String
    name String
    upstreamServers List<String>
    domainNames string[]
    id string
    name string
    upstreamServers string[]
    domain_names Sequence[str]
    id str
    name str
    upstream_servers Sequence[str]
    domainNames List<String>
    id String
    name String
    upstreamServers List<String>

    GetNsxtEdgegatewayDnsDefaultForwarderZone

    Id string
    Name string
    UpstreamServers List<string>
    Id string
    Name string
    UpstreamServers []string
    id String
    name String
    upstreamServers List<String>
    id string
    name string
    upstreamServers string[]
    id str
    name str
    upstream_servers Sequence[str]
    id String
    name String
    upstreamServers List<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