1. Packages
  2. Confluent Provider
  3. API Docs
  4. getDnsRecord
Confluent v2.24.0 published on Saturday, Apr 19, 2025 by Pulumi

confluentcloud.getDnsRecord

Explore with Pulumi AI

Confluent v2.24.0 published on Saturday, Apr 19, 2025 by Pulumi

General Availability

confluentcloud.DnsRecord describes a DNS Record data source.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as confluentcloud from "@pulumi/confluentcloud";

const main = confluentcloud.getDnsRecord({
    id: "dnsrec-abc123",
    environment: {
        id: "env-123abc",
    },
});
export const dnsRecord = main;
Copy
import pulumi
import pulumi_confluentcloud as confluentcloud

main = confluentcloud.get_dns_record(id="dnsrec-abc123",
    environment={
        "id": "env-123abc",
    })
pulumi.export("dnsRecord", main)
Copy
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 {
		main, err := confluentcloud.LookupDnsRecord(ctx, &confluentcloud.LookupDnsRecordArgs{
			Id: "dnsrec-abc123",
			Environment: confluentcloud.GetDnsRecordEnvironment{
				Id: "env-123abc",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("dnsRecord", main)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;

return await Deployment.RunAsync(() => 
{
    var main = ConfluentCloud.GetDnsRecord.Invoke(new()
    {
        Id = "dnsrec-abc123",
        Environment = new ConfluentCloud.Inputs.GetDnsRecordEnvironmentInputArgs
        {
            Id = "env-123abc",
        },
    });

    return new Dictionary<string, object?>
    {
        ["dnsRecord"] = main,
    };
});
Copy
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.GetDnsRecordArgs;
import com.pulumi.confluentcloud.inputs.GetDnsRecordEnvironmentArgs;
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 main = ConfluentcloudFunctions.getDnsRecord(GetDnsRecordArgs.builder()
            .id("dnsrec-abc123")
            .environment(GetDnsRecordEnvironmentArgs.builder()
                .id("env-123abc")
                .build())
            .build());

        ctx.export("dnsRecord", main);
    }
}
Copy
variables:
  main:
    fn::invoke:
      function: confluentcloud:getDnsRecord
      arguments:
        id: dnsrec-abc123
        environment:
          id: env-123abc
outputs:
  dnsRecord: ${main}
Copy

Using getDnsRecord

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 getDnsRecord(args: GetDnsRecordArgs, opts?: InvokeOptions): Promise<GetDnsRecordResult>
function getDnsRecordOutput(args: GetDnsRecordOutputArgs, opts?: InvokeOptions): Output<GetDnsRecordResult>
Copy
def get_dns_record(environment: Optional[GetDnsRecordEnvironment] = None,
                   id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetDnsRecordResult
def get_dns_record_output(environment: Optional[pulumi.Input[GetDnsRecordEnvironmentArgs]] = None,
                   id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetDnsRecordResult]
Copy
func LookupDnsRecord(ctx *Context, args *LookupDnsRecordArgs, opts ...InvokeOption) (*LookupDnsRecordResult, error)
func LookupDnsRecordOutput(ctx *Context, args *LookupDnsRecordOutputArgs, opts ...InvokeOption) LookupDnsRecordResultOutput
Copy

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

public static class GetDnsRecord 
{
    public static Task<GetDnsRecordResult> InvokeAsync(GetDnsRecordArgs args, InvokeOptions? opts = null)
    public static Output<GetDnsRecordResult> Invoke(GetDnsRecordInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDnsRecordResult> getDnsRecord(GetDnsRecordArgs args, InvokeOptions options)
public static Output<GetDnsRecordResult> getDnsRecord(GetDnsRecordArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: confluentcloud:index/getDnsRecord:getDnsRecord
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Environment This property is required. Pulumi.ConfluentCloud.Inputs.GetDnsRecordEnvironment
Id This property is required. string
The ID of the DNS Record, for example, dnsrec-abc123.
Environment This property is required. GetDnsRecordEnvironment
Id This property is required. string
The ID of the DNS Record, for example, dnsrec-abc123.
environment This property is required. GetDnsRecordEnvironment
id This property is required. String
The ID of the DNS Record, for example, dnsrec-abc123.
environment This property is required. GetDnsRecordEnvironment
id This property is required. string
The ID of the DNS Record, for example, dnsrec-abc123.
environment This property is required. GetDnsRecordEnvironment
id This property is required. str
The ID of the DNS Record, for example, dnsrec-abc123.
environment This property is required. Property Map
id This property is required. String
The ID of the DNS Record, for example, dnsrec-abc123.

getDnsRecord Result

The following output properties are available:

DisplayName string
(Required String) A human-readable name for the DNS Record.
Domain string
(Required String) The fully qualified domain name of the DNS Record.
Environment Pulumi.ConfluentCloud.Outputs.GetDnsRecordEnvironment
Gateways List<Pulumi.ConfluentCloud.Outputs.GetDnsRecordGateway>
(Required Configuration Block) supports the following:
Id string
(Required String) The ID of the Private Link access point to which the DNS Record is associated, for example ap-123abc.
PrivateLinkAccessPoints List<Pulumi.ConfluentCloud.Outputs.GetDnsRecordPrivateLinkAccessPoint>
(Required Configuration Block) supports the following:
DisplayName string
(Required String) A human-readable name for the DNS Record.
Domain string
(Required String) The fully qualified domain name of the DNS Record.
Environment GetDnsRecordEnvironment
Gateways []GetDnsRecordGateway
(Required Configuration Block) supports the following:
Id string
(Required String) The ID of the Private Link access point to which the DNS Record is associated, for example ap-123abc.
PrivateLinkAccessPoints []GetDnsRecordPrivateLinkAccessPoint
(Required Configuration Block) supports the following:
displayName String
(Required String) A human-readable name for the DNS Record.
domain String
(Required String) The fully qualified domain name of the DNS Record.
environment GetDnsRecordEnvironment
gateways List<GetDnsRecordGateway>
(Required Configuration Block) supports the following:
id String
(Required String) The ID of the Private Link access point to which the DNS Record is associated, for example ap-123abc.
privateLinkAccessPoints List<GetDnsRecordPrivateLinkAccessPoint>
(Required Configuration Block) supports the following:
displayName string
(Required String) A human-readable name for the DNS Record.
domain string
(Required String) The fully qualified domain name of the DNS Record.
environment GetDnsRecordEnvironment
gateways GetDnsRecordGateway[]
(Required Configuration Block) supports the following:
id string
(Required String) The ID of the Private Link access point to which the DNS Record is associated, for example ap-123abc.
privateLinkAccessPoints GetDnsRecordPrivateLinkAccessPoint[]
(Required Configuration Block) supports the following:
display_name str
(Required String) A human-readable name for the DNS Record.
domain str
(Required String) The fully qualified domain name of the DNS Record.
environment GetDnsRecordEnvironment
gateways Sequence[GetDnsRecordGateway]
(Required Configuration Block) supports the following:
id str
(Required String) The ID of the Private Link access point to which the DNS Record is associated, for example ap-123abc.
private_link_access_points Sequence[GetDnsRecordPrivateLinkAccessPoint]
(Required Configuration Block) supports the following:
displayName String
(Required String) A human-readable name for the DNS Record.
domain String
(Required String) The fully qualified domain name of the DNS Record.
environment Property Map
gateways List<Property Map>
(Required Configuration Block) supports the following:
id String
(Required String) The ID of the Private Link access point to which the DNS Record is associated, for example ap-123abc.
privateLinkAccessPoints List<Property Map>
(Required Configuration Block) supports the following:

Supporting Types

GetDnsRecordEnvironment

Id This property is required. string
The ID of the Environment that the DNS Record belongs to, for example, env-123abc.
Id This property is required. string
The ID of the Environment that the DNS Record belongs to, for example, env-123abc.
id This property is required. String
The ID of the Environment that the DNS Record belongs to, for example, env-123abc.
id This property is required. string
The ID of the Environment that the DNS Record belongs to, for example, env-123abc.
id This property is required. str
The ID of the Environment that the DNS Record belongs to, for example, env-123abc.
id This property is required. String
The ID of the Environment that the DNS Record belongs to, for example, env-123abc.

GetDnsRecordGateway

Id This property is required. string
The ID of the DNS Record, for example, dnsrec-abc123.
Id This property is required. string
The ID of the DNS Record, for example, dnsrec-abc123.
id This property is required. String
The ID of the DNS Record, for example, dnsrec-abc123.
id This property is required. string
The ID of the DNS Record, for example, dnsrec-abc123.
id This property is required. str
The ID of the DNS Record, for example, dnsrec-abc123.
id This property is required. String
The ID of the DNS Record, for example, dnsrec-abc123.

GetDnsRecordPrivateLinkAccessPoint

Id This property is required. string
The ID of the DNS Record, for example, dnsrec-abc123.
Id This property is required. string
The ID of the DNS Record, for example, dnsrec-abc123.
id This property is required. String
The ID of the DNS Record, for example, dnsrec-abc123.
id This property is required. string
The ID of the DNS Record, for example, dnsrec-abc123.
id This property is required. str
The ID of the DNS Record, for example, dnsrec-abc123.
id This property is required. String
The ID of the DNS Record, for example, dnsrec-abc123.

Package Details

Repository
Confluent Cloud pulumi/pulumi-confluentcloud
License
Apache-2.0
Notes
This Pulumi package is based on the confluent Terraform Provider.
Confluent v2.24.0 published on Saturday, Apr 19, 2025 by Pulumi