1. Registry
  2. Packages
  3. Confluent Provider
  4. API Docs
  5. getDnsForwarder
Viewing docs for Confluent v2.82.0
published on Saturday, Sep 12, 2026 by Pulumi
confluentcloud logo
Viewing docs for Confluent v2.82.0
published on Saturday, Sep 12, 2026 by Pulumi

    General Availability

    confluentcloud.DnsForwarder describes a DNS Forwarder data source.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as confluentcloud from "@pulumi/confluentcloud";
    
    export = async () => {
        const example = await confluentcloud.getDnsForwarder({
            id: "dnsf-abc123",
            environment: {
                id: "env-xyz456",
            },
        });
        return {
            example: example,
        };
    }
    
    import pulumi
    import pulumi_confluentcloud as confluentcloud
    
    example = confluentcloud.get_dns_forwarder(id="dnsf-abc123",
        environment={
            "id": "env-xyz456",
        })
    pulumi.export("example", example)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-confluentcloud/sdk/v2/go/confluentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := confluentcloud.GetDnsForwarder(ctx, &confluentcloud.LookupDnsForwarderArgs{
    			Id: "dnsf-abc123",
    			Environment: confluentcloud.GetDnsForwarderEnvironment{
    				Id: "env-xyz456",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("example", example)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ConfluentCloud = Pulumi.ConfluentCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = ConfluentCloud.GetDnsForwarder.Invoke(new()
        {
            Id = "dnsf-abc123",
            Environment = new ConfluentCloud.Inputs.GetDnsForwarderEnvironmentInputArgs
            {
                Id = "env-xyz456",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["example"] = example,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.confluentcloud.ConfluentcloudFunctions;
    import com.pulumi.confluentcloud.inputs.GetDnsForwarderArgs;
    import com.pulumi.confluentcloud.inputs.GetDnsForwarderEnvironmentArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = ConfluentcloudFunctions.getDnsForwarder(GetDnsForwarderArgs.builder()
                .id("dnsf-abc123")
                .environment(GetDnsForwarderEnvironmentArgs.builder()
                    .id("env-xyz456")
                    .build())
                .build());
    
            ctx.export("example", example);
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: confluentcloud:getDnsForwarder
          arguments:
            id: dnsf-abc123
            environment:
              id: env-xyz456
    outputs:
      example: ${example}
    
    pulumi {
      required_providers {
        confluentcloud = {
          source = "pulumi/confluentcloud"
        }
      }
    }
    
    data "confluentcloud_getdnsforwarder" "example" {
      id = "dnsf-abc123"
      environment = {
        id = "env-xyz456"
      }
    }
    
    output "example" {
      value = data.confluentcloud_getdnsforwarder.example
    }
    

    Getting Started

    The following end-to-end example might help to get started with confluentcloud.DnsForwarder data source:

    • dns-forwarder: creates a confluentcloud.DnsForwarder resource that forwards a domain via GCP DNS zones for a GCP Peering network, using a confluentcloud.Gateway data source to look up the network’s gateway.

    Using getDnsForwarder

    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 getDnsForwarder(args: GetDnsForwarderArgs, opts?: InvokeOptions): Promise<GetDnsForwarderResult>
    function getDnsForwarderOutput(args: GetDnsForwarderOutputArgs, opts?: InvokeOutputOptions): Output<GetDnsForwarderResult>
    def get_dns_forwarder(environment: Optional[GetDnsForwarderEnvironment] = None,
                          id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetDnsForwarderResult
    def get_dns_forwarder_output(environment: pulumi.Input[Optional[GetDnsForwarderEnvironmentArgs]] = None,
                          id: pulumi.Input[Optional[str]] = None,
                          opts: Optional[InvokeOutputOptions] = None) -> Output[GetDnsForwarderResult]
    func LookupDnsForwarder(ctx *Context, args *LookupDnsForwarderArgs, opts ...InvokeOption) (*LookupDnsForwarderResult, error)
    func LookupDnsForwarderOutput(ctx *Context, args *LookupDnsForwarderOutputArgs, opts ...InvokeOption) LookupDnsForwarderResultOutput

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

    public static class GetDnsForwarder 
    {
        public static Task<GetDnsForwarderResult> InvokeAsync(GetDnsForwarderArgs args, InvokeOptions? opts = null)
        public static Output<GetDnsForwarderResult> Invoke(GetDnsForwarderInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetDnsForwarderResult> Invoke(GetDnsForwarderInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetDnsForwarderResult> getDnsForwarder(GetDnsForwarderArgs args, InvokeOptions options)
    public static Output<GetDnsForwarderResult> getDnsForwarder(GetDnsForwarderArgs args, InvokeOptions options)
    public static Output<GetDnsForwarderResult> getDnsForwarder(GetDnsForwarderArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: confluentcloud:index/getDnsForwarder:getDnsForwarder
      arguments:
        # arguments dictionary
    data "confluentcloud_get_dns_forwarder" "name" {
        # arguments
    }

    The following arguments are supported:

    Environment Pulumi.ConfluentCloud.Inputs.GetDnsForwarderEnvironment
    Supports the following:
    Id string
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    Environment GetDnsForwarderEnvironment
    Supports the following:
    Id string
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    environment object
    Supports the following:
    id string
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    environment GetDnsForwarderEnvironment
    Supports the following:
    id String
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    environment GetDnsForwarderEnvironment
    Supports the following:
    id string
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    environment GetDnsForwarderEnvironment
    Supports the following:
    id str
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    environment Property Map
    Supports the following:
    id String
    The ID of the DNS Forwarder, for example, dnsf-abc123.

    getDnsForwarder Result

    The following output properties are available:

    DisplayName string
    (String) The name of the DNS forwarder
    Domains List<string>
    (Set of Strings) List of domains for the DNS forwarder to use
    Environment Pulumi.ConfluentCloud.Outputs.GetDnsForwarderEnvironment
    ForwardViaGcpDnsZones List<Pulumi.ConfluentCloud.Outputs.GetDnsForwarderForwardViaGcpDnsZone>
    (Configuration Block) Supports the following:
    ForwardViaIps List<Pulumi.ConfluentCloud.Outputs.GetDnsForwarderForwardViaIp>
    (Configuration Block) Supports the following:
    Gateways List<Pulumi.ConfluentCloud.Outputs.GetDnsForwarderGateway>
    (Configuration Block) The gateway to which this belongs. Supports the following:
    Id string
    (String) The ID of the Gateway.
    DisplayName string
    (String) The name of the DNS forwarder
    Domains []string
    (Set of Strings) List of domains for the DNS forwarder to use
    Environment GetDnsForwarderEnvironment
    ForwardViaGcpDnsZones []GetDnsForwarderForwardViaGcpDnsZone
    (Configuration Block) Supports the following:
    ForwardViaIps []GetDnsForwarderForwardViaIp
    (Configuration Block) Supports the following:
    Gateways []GetDnsForwarderGateway
    (Configuration Block) The gateway to which this belongs. Supports the following:
    Id string
    (String) The ID of the Gateway.
    display_name string
    (String) The name of the DNS forwarder
    domains list(string)
    (Set of Strings) List of domains for the DNS forwarder to use
    environment object
    forward_via_gcp_dns_zones list(object)
    (Configuration Block) Supports the following:
    forward_via_ips list(object)
    (Configuration Block) Supports the following:
    gateways list(object)
    (Configuration Block) The gateway to which this belongs. Supports the following:
    id string
    (String) The ID of the Gateway.
    displayName String
    (String) The name of the DNS forwarder
    domains List<String>
    (Set of Strings) List of domains for the DNS forwarder to use
    environment GetDnsForwarderEnvironment
    forwardViaGcpDnsZones List<GetDnsForwarderForwardViaGcpDnsZone>
    (Configuration Block) Supports the following:
    forwardViaIps List<GetDnsForwarderForwardViaIp>
    (Configuration Block) Supports the following:
    gateways List<GetDnsForwarderGateway>
    (Configuration Block) The gateway to which this belongs. Supports the following:
    id String
    (String) The ID of the Gateway.
    displayName string
    (String) The name of the DNS forwarder
    domains string[]
    (Set of Strings) List of domains for the DNS forwarder to use
    environment GetDnsForwarderEnvironment
    forwardViaGcpDnsZones GetDnsForwarderForwardViaGcpDnsZone[]
    (Configuration Block) Supports the following:
    forwardViaIps GetDnsForwarderForwardViaIp[]
    (Configuration Block) Supports the following:
    gateways GetDnsForwarderGateway[]
    (Configuration Block) The gateway to which this belongs. Supports the following:
    id string
    (String) The ID of the Gateway.
    display_name str
    (String) The name of the DNS forwarder
    domains Sequence[str]
    (Set of Strings) List of domains for the DNS forwarder to use
    environment GetDnsForwarderEnvironment
    forward_via_gcp_dns_zones Sequence[GetDnsForwarderForwardViaGcpDnsZone]
    (Configuration Block) Supports the following:
    forward_via_ips Sequence[GetDnsForwarderForwardViaIp]
    (Configuration Block) Supports the following:
    gateways Sequence[GetDnsForwarderGateway]
    (Configuration Block) The gateway to which this belongs. Supports the following:
    id str
    (String) The ID of the Gateway.
    displayName String
    (String) The name of the DNS forwarder
    domains List<String>
    (Set of Strings) List of domains for the DNS forwarder to use
    environment Property Map
    forwardViaGcpDnsZones List<Property Map>
    (Configuration Block) Supports the following:
    forwardViaIps List<Property Map>
    (Configuration Block) Supports the following:
    gateways List<Property Map>
    (Configuration Block) The gateway to which this belongs. Supports the following:
    id String
    (String) The ID of the Gateway.

    Supporting Types

    GetDnsForwarderEnvironment

    Id string
    The ID of the Environment that the DNS Forwarder belongs to, for example, env-xyz456.
    Id string
    The ID of the Environment that the DNS Forwarder belongs to, for example, env-xyz456.
    id string
    The ID of the Environment that the DNS Forwarder belongs to, for example, env-xyz456.
    id String
    The ID of the Environment that the DNS Forwarder belongs to, for example, env-xyz456.
    id string
    The ID of the Environment that the DNS Forwarder belongs to, for example, env-xyz456.
    id str
    The ID of the Environment that the DNS Forwarder belongs to, for example, env-xyz456.
    id String
    The ID of the Environment that the DNS Forwarder belongs to, for example, env-xyz456.

    GetDnsForwarderForwardViaGcpDnsZone

    DomainMappings Dictionary<string, string>
    (Map of String) Mapping of domain names to GCP DNS Zones and Project ID.
    DomainMappings map[string]string
    (Map of String) Mapping of domain names to GCP DNS Zones and Project ID.
    domain_mappings map(string)
    (Map of String) Mapping of domain names to GCP DNS Zones and Project ID.
    domainMappings Map<String,String>
    (Map of String) Mapping of domain names to GCP DNS Zones and Project ID.
    domainMappings {[key: string]: string}
    (Map of String) Mapping of domain names to GCP DNS Zones and Project ID.
    domain_mappings Mapping[str, str]
    (Map of String) Mapping of domain names to GCP DNS Zones and Project ID.
    domainMappings Map<String>
    (Map of String) Mapping of domain names to GCP DNS Zones and Project ID.

    GetDnsForwarderForwardViaIp

    DnsServerIps List<string>
    (Set of Strings) List of IP addresses of the DNS server
    DnsServerIps []string
    (Set of Strings) List of IP addresses of the DNS server
    dns_server_ips list(string)
    (Set of Strings) List of IP addresses of the DNS server
    dnsServerIps List<String>
    (Set of Strings) List of IP addresses of the DNS server
    dnsServerIps string[]
    (Set of Strings) List of IP addresses of the DNS server
    dns_server_ips Sequence[str]
    (Set of Strings) List of IP addresses of the DNS server
    dnsServerIps List<String>
    (Set of Strings) List of IP addresses of the DNS server

    GetDnsForwarderGateway

    Id string
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    Id string
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    id string
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    id String
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    id string
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    id str
    The ID of the DNS Forwarder, for example, dnsf-abc123.
    id String
    The ID of the DNS Forwarder, for example, dnsf-abc123.

    Package Details

    Repository
    Confluent Cloud pulumi/pulumi-confluentcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the confluent Terraform Provider.
    confluentcloud logo
    Viewing docs for Confluent v2.82.0
    published on Saturday, Sep 12, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial