1. Packages
  2. Exoscale
  3. API Docs
  4. getDomainRecord
Exoscale v0.66.1 published on Tuesday, Nov 4, 2025 by Pulumiverse

exoscale.getDomainRecord

Get Started
exoscale logo
Exoscale v0.66.1 published on Tuesday, Nov 4, 2025 by Pulumiverse

    Fetch Exoscale DNS Domain Records data.

    Corresponding resource: exoscale_domain_record.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as exoscale from "@pulumiverse/exoscale";
    import * as std from "@pulumi/std";
    
    export = async () => {
        const myDomain = await exoscale.getDomain({
            name: "my.domain",
        });
        const myExoscaleDomainARecords = await exoscale.getDomainRecord({
            domain: myDomain.name,
            filter: {
                name: "my-host",
                recordType: "A",
            },
        });
        const myExoscaleDomainNSRecords = await exoscale.getDomainRecord({
            domain: myDomain.name,
            filter: {
                contentRegex: "ns.*",
            },
        });
        return {
            myExoscaleDomainARecords: (await std.join({
                separator: "\n",
                input: (await std.formatlist({
                    input: "%s",
                    args: [myExoscaleDomainARecords.records.map(__item => __item.name)],
                })).result,
            })).result,
            myExoscaleDomainNSRecords: (await std.join({
                separator: "\n",
                input: (await std.formatlist({
                    input: "%s",
                    args: [myExoscaleDomainNSRecords.records.map(__item => __item.content)],
                })).result,
            })).result,
        };
    }
    
    import pulumi
    import pulumi_exoscale as exoscale
    import pulumi_std as std
    
    my_domain = exoscale.get_domain(name="my.domain")
    my_exoscale_domain_a_records = exoscale.get_domain_record(domain=my_domain.name,
        filter={
            "name": "my-host",
            "record_type": "A",
        })
    my_exoscale_domain_ns_records = exoscale.get_domain_record(domain=my_domain.name,
        filter={
            "content_regex": "ns.*",
        })
    pulumi.export("myExoscaleDomainARecords", std.join(separator="\n",
        input=std.formatlist(input="%s",
            args=[[__item.name for __item in my_exoscale_domain_a_records.records]]).result).result)
    pulumi.export("myExoscaleDomainNSRecords", std.join(separator="\n",
        input=std.formatlist(input="%s",
            args=[[__item.content for __item in my_exoscale_domain_ns_records.records]]).result).result)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-exoscale/sdk/go/exoscale"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    myDomain, err := exoscale.LookupDomain(ctx, &exoscale.LookupDomainArgs{
    Name: "my.domain",
    }, nil);
    if err != nil {
    return err
    }
    myExoscaleDomainARecords, err := exoscale.LookupDomainRecord(ctx, &exoscale.LookupDomainRecordArgs{
    Domain: myDomain.Name,
    Filter: exoscale.GetDomainRecordFilter{
    Name: pulumi.StringRef("my-host"),
    RecordType: pulumi.StringRef("A"),
    },
    }, nil);
    if err != nil {
    return err
    }
    myExoscaleDomainNSRecords, err := exoscale.LookupDomainRecord(ctx, &exoscale.LookupDomainRecordArgs{
    Domain: myDomain.Name,
    Filter: exoscale.GetDomainRecordFilter{
    ContentRegex: pulumi.StringRef("ns.*"),
    },
    }, nil);
    if err != nil {
    return err
    }
    ctx.Export("myExoscaleDomainARecords", pulumi.String(std.Join(ctx, &std.JoinArgs{
    Separator: "\n",
    Input: std.Formatlist(ctx, &std.FormatlistArgs{
    Input: "%s",
    Args: [][]*string{
    %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:24,16-56),
    },
    }, nil).Result,
    }, nil).Result))
    ctx.Export("myExoscaleDomainNSRecords", pulumi.String(std.Join(ctx, &std.JoinArgs{
    Separator: "\n",
    Input: std.Formatlist(ctx, &std.FormatlistArgs{
    Input: "%s",
    Args: [][]*string{
    %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:34,16-60),
    },
    }, nil).Result,
    }, nil).Result))
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Exoscale = Pulumi.Exoscale;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var myDomain = Exoscale.GetDomain.Invoke(new()
        {
            Name = "my.domain",
        });
    
        var myExoscaleDomainARecords = Exoscale.GetDomainRecord.Invoke(new()
        {
            Domain = myDomain.Apply(getDomainResult => getDomainResult.Name),
            Filter = new Exoscale.Inputs.GetDomainRecordFilterInputArgs
            {
                Name = "my-host",
                RecordType = "A",
            },
        });
    
        var myExoscaleDomainNSRecords = Exoscale.GetDomainRecord.Invoke(new()
        {
            Domain = myDomain.Apply(getDomainResult => getDomainResult.Name),
            Filter = new Exoscale.Inputs.GetDomainRecordFilterInputArgs
            {
                ContentRegex = "ns.*",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["myExoscaleDomainARecords"] = Std.Formatlist.Invoke(new()
            {
                Input = "%s",
                Args = new[]
                {
                    myExoscaleDomainARecords.Apply(getDomainRecordResult => getDomainRecordResult.Records).Select(__item => __item.Name).ToList(),
                },
            }).Apply(invoke => Std.Join.Invoke(new()
            {
                Separator = @"
    ",
                Input = invoke.Result,
            })).Apply(invoke => invoke.Result),
            ["myExoscaleDomainNSRecords"] = Std.Formatlist.Invoke(new()
            {
                Input = "%s",
                Args = new[]
                {
                    myExoscaleDomainNSRecords.Apply(getDomainRecordResult => getDomainRecordResult.Records).Select(__item => __item.Content).ToList(),
                },
            }).Apply(invoke => Std.Join.Invoke(new()
            {
                Separator = @"
    ",
                Input = invoke.Result,
            })).Apply(invoke => invoke.Result),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.exoscale.ExoscaleFunctions;
    import com.pulumi.exoscale.inputs.GetDomainArgs;
    import com.pulumi.exoscale.inputs.GetDomainRecordArgs;
    import com.pulumi.exoscale.inputs.GetDomainRecordFilterArgs;
    import com.pulumi.std.StdFunctions;
    import com.pulumi.std.inputs.FormatlistArgs;
    import com.pulumi.std.inputs.JoinArgs;
    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 myDomain = ExoscaleFunctions.getDomain(GetDomainArgs.builder()
                .name("my.domain")
                .build());
    
            final var myExoscaleDomainARecords = ExoscaleFunctions.getDomainRecord(GetDomainRecordArgs.builder()
                .domain(myDomain.name())
                .filter(GetDomainRecordFilterArgs.builder()
                    .name("my-host")
                    .recordType("A")
                    .build())
                .build());
    
            final var myExoscaleDomainNSRecords = ExoscaleFunctions.getDomainRecord(GetDomainRecordArgs.builder()
                .domain(myDomain.name())
                .filter(GetDomainRecordFilterArgs.builder()
                    .contentRegex("ns.*")
                    .build())
                .build());
    
            ctx.export("myExoscaleDomainARecords", StdFunctions.join(JoinArgs.builder()
                .separator("""
    
                """)
                .input(StdFunctions.formatlist(FormatlistArgs.builder()
                    .input("%s")
                    .args(myExoscaleDomainARecords.records().stream().map(element -> element.name()).collect(toList()))
                    .build()).result())
                .build()).result());
            ctx.export("myExoscaleDomainNSRecords", StdFunctions.join(JoinArgs.builder()
                .separator("""
    
                """)
                .input(StdFunctions.formatlist(FormatlistArgs.builder()
                    .input("%s")
                    .args(myExoscaleDomainNSRecords.records().stream().map(element -> element.content()).collect(toList()))
                    .build()).result())
                .build()).result());
        }
    }
    
    Example coming soon!
    

    Please refer to the examples directory for complete configuration examples.

    Using getDomainRecord

    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 getDomainRecord(args: GetDomainRecordArgs, opts?: InvokeOptions): Promise<GetDomainRecordResult>
    function getDomainRecordOutput(args: GetDomainRecordOutputArgs, opts?: InvokeOptions): Output<GetDomainRecordResult>
    def get_domain_record(domain: Optional[str] = None,
                          filter: Optional[GetDomainRecordFilter] = None,
                          opts: Optional[InvokeOptions] = None) -> GetDomainRecordResult
    def get_domain_record_output(domain: Optional[pulumi.Input[str]] = None,
                          filter: Optional[pulumi.Input[GetDomainRecordFilterArgs]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetDomainRecordResult]
    func LookupDomainRecord(ctx *Context, args *LookupDomainRecordArgs, opts ...InvokeOption) (*LookupDomainRecordResult, error)
    func LookupDomainRecordOutput(ctx *Context, args *LookupDomainRecordOutputArgs, opts ...InvokeOption) LookupDomainRecordResultOutput

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

    public static class GetDomainRecord 
    {
        public static Task<GetDomainRecordResult> InvokeAsync(GetDomainRecordArgs args, InvokeOptions? opts = null)
        public static Output<GetDomainRecordResult> Invoke(GetDomainRecordInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDomainRecordResult> getDomainRecord(GetDomainRecordArgs args, InvokeOptions options)
    public static Output<GetDomainRecordResult> getDomainRecord(GetDomainRecordArgs args, InvokeOptions options)
    
    fn::invoke:
      function: exoscale:index/getDomainRecord:getDomainRecord
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Domain string
    The exoscale.Domain name to match.
    Filter Pulumiverse.Exoscale.Inputs.GetDomainRecordFilter
    Filter to apply when looking up domain records.
    Domain string
    The exoscale.Domain name to match.
    Filter GetDomainRecordFilter
    Filter to apply when looking up domain records.
    domain String
    The exoscale.Domain name to match.
    filter GetDomainRecordFilter
    Filter to apply when looking up domain records.
    domain string
    The exoscale.Domain name to match.
    filter GetDomainRecordFilter
    Filter to apply when looking up domain records.
    domain str
    The exoscale.Domain name to match.
    filter GetDomainRecordFilter
    Filter to apply when looking up domain records.
    domain String
    The exoscale.Domain name to match.
    filter Property Map
    Filter to apply when looking up domain records.

    getDomainRecord Result

    The following output properties are available:

    Domain string
    The exoscale.Domain name to match.
    Filter Pulumiverse.Exoscale.Outputs.GetDomainRecordFilter
    Filter to apply when looking up domain records.
    Id string
    The provider-assigned unique ID for this managed resource.
    Records List<Pulumiverse.Exoscale.Outputs.GetDomainRecordRecord>
    The list of matching records. Structure is documented below.
    Domain string
    The exoscale.Domain name to match.
    Filter GetDomainRecordFilter
    Filter to apply when looking up domain records.
    Id string
    The provider-assigned unique ID for this managed resource.
    Records []GetDomainRecordRecord
    The list of matching records. Structure is documented below.
    domain String
    The exoscale.Domain name to match.
    filter GetDomainRecordFilter
    Filter to apply when looking up domain records.
    id String
    The provider-assigned unique ID for this managed resource.
    records List<GetDomainRecordRecord>
    The list of matching records. Structure is documented below.
    domain string
    The exoscale.Domain name to match.
    filter GetDomainRecordFilter
    Filter to apply when looking up domain records.
    id string
    The provider-assigned unique ID for this managed resource.
    records GetDomainRecordRecord[]
    The list of matching records. Structure is documented below.
    domain str
    The exoscale.Domain name to match.
    filter GetDomainRecordFilter
    Filter to apply when looking up domain records.
    id str
    The provider-assigned unique ID for this managed resource.
    records Sequence[GetDomainRecordRecord]
    The list of matching records. Structure is documented below.
    domain String
    The exoscale.Domain name to match.
    filter Property Map
    Filter to apply when looking up domain records.
    id String
    The provider-assigned unique ID for this managed resource.
    records List<Property Map>
    The list of matching records. Structure is documented below.

    Supporting Types

    GetDomainRecordFilter

    ContentRegex string
    A regular expression to match the record content.
    Id string
    The record ID to match.
    Name string
    The domain record name to match.
    RecordType string
    The record type to match.
    ContentRegex string
    A regular expression to match the record content.
    Id string
    The record ID to match.
    Name string
    The domain record name to match.
    RecordType string
    The record type to match.
    contentRegex String
    A regular expression to match the record content.
    id String
    The record ID to match.
    name String
    The domain record name to match.
    recordType String
    The record type to match.
    contentRegex string
    A regular expression to match the record content.
    id string
    The record ID to match.
    name string
    The domain record name to match.
    recordType string
    The record type to match.
    content_regex str
    A regular expression to match the record content.
    id str
    The record ID to match.
    name str
    The domain record name to match.
    record_type str
    The record type to match.
    contentRegex String
    A regular expression to match the record content.
    id String
    The record ID to match.
    name String
    The domain record name to match.
    recordType String
    The record type to match.

    GetDomainRecordRecord

    Content string
    Content of the Record
    Domain string
    Domain of the Record
    Id string
    ID of the Record
    Name string
    Name of the Record
    Prio int
    Priority of the Record
    RecordType string
    Type of the Record
    Ttl int
    TTL of the Record
    Content string
    Content of the Record
    Domain string
    Domain of the Record
    Id string
    ID of the Record
    Name string
    Name of the Record
    Prio int
    Priority of the Record
    RecordType string
    Type of the Record
    Ttl int
    TTL of the Record
    content String
    Content of the Record
    domain String
    Domain of the Record
    id String
    ID of the Record
    name String
    Name of the Record
    prio Integer
    Priority of the Record
    recordType String
    Type of the Record
    ttl Integer
    TTL of the Record
    content string
    Content of the Record
    domain string
    Domain of the Record
    id string
    ID of the Record
    name string
    Name of the Record
    prio number
    Priority of the Record
    recordType string
    Type of the Record
    ttl number
    TTL of the Record
    content str
    Content of the Record
    domain str
    Domain of the Record
    id str
    ID of the Record
    name str
    Name of the Record
    prio int
    Priority of the Record
    record_type str
    Type of the Record
    ttl int
    TTL of the Record
    content String
    Content of the Record
    domain String
    Domain of the Record
    id String
    ID of the Record
    name String
    Name of the Record
    prio Number
    Priority of the Record
    recordType String
    Type of the Record
    ttl Number
    TTL of the Record

    Package Details

    Repository
    exoscale pulumiverse/pulumi-exoscale
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the exoscale Terraform Provider.
    exoscale logo
    Exoscale v0.66.1 published on Tuesday, Nov 4, 2025 by Pulumiverse
      Meet Neo: Your AI Platform Teammate