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

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,
}));
Copy
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)
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 {
		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
	})
}
Copy
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),
    });

});
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.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());

    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func LookupNsxtEdgegatewayDns(ctx *Context, args *LookupNsxtEdgegatewayDnsArgs, opts ...InvokeOption) (*LookupNsxtEdgegatewayDnsResult, error)
func LookupNsxtEdgegatewayDnsOutput(ctx *Context, args *LookupNsxtEdgegatewayDnsOutputArgs, opts ...InvokeOption) LookupNsxtEdgegatewayDnsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetNsxtEdgegatewayDnsResult> getNsxtEdgegatewayDns(GetNsxtEdgegatewayDnsArgs args, InvokeOptions options)
public static Output<GetNsxtEdgegatewayDnsResult> getNsxtEdgegatewayDns(GetNsxtEdgegatewayDnsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vcd:index/getNsxtEdgegatewayDns:getNsxtEdgegatewayDns
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EdgeGatewayId This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. List<string>
Id This property is required. string
Name This property is required. string
UpstreamServers This property is required. List<string>
DomainNames This property is required. []string
Id This property is required. string
Name This property is required. string
UpstreamServers This property is required. []string
domainNames This property is required. List<String>
id This property is required. String
name This property is required. String
upstreamServers This property is required. List<String>
domainNames This property is required. string[]
id This property is required. string
name This property is required. string
upstreamServers This property is required. string[]
domain_names This property is required. Sequence[str]
id This property is required. str
name This property is required. str
upstream_servers This property is required. Sequence[str]
domainNames This property is required. List<String>
id This property is required. String
name This property is required. String
upstreamServers This property is required. List<String>

GetNsxtEdgegatewayDnsDefaultForwarderZone

Id This property is required. string
Name This property is required. string
UpstreamServers This property is required. List<string>
Id This property is required. string
Name This property is required. string
UpstreamServers This property is required. []string
id This property is required. String
name This property is required. String
upstreamServers This property is required. List<String>
id This property is required. string
name This property is required. string
upstreamServers This property is required. string[]
id This property is required. str
name This property is required. str
upstream_servers This property is required. Sequence[str]
id This property is required. String
name This property is required. String
upstreamServers This property is required. List<String>

Package Details

Repository
vcd vmware/terraform-provider-vcd
License
Notes
This Pulumi package is based on the vcd Terraform Provider.