GetDomain

Get information on a domain. This data source provides the name, TTL, and zone file as configured on your DigitalOcean account. This is useful if the domain name in question is not managed by this provider or you need to utilize TTL or zone file data.

An error is triggered if the provided domain name is not managed with your DigitalOcean account.

Example Usage

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(DigitalOcean.GetDomain.InvokeAsync(new DigitalOcean.GetDomainArgs
        {
            Name = "example.com",
        }));
        this.DomainOutput = example.Apply(example => example.ZoneFile);
    }

    [Output("domainOutput")]
    public Output<string> DomainOutput { get; set; }
}

Coming soon!

import pulumi
import pulumi_digitalocean as digitalocean

example = digitalocean.get_domain(name="example.com")
pulumi.export("domainOutput", example.zone_file)
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const example = digitalocean.getDomain({
    name: "example.com",
});
export const domainOutput = example.then(example => example.zoneFile);

Using GetDomain

function getDomain(args: GetDomainArgs, opts?: InvokeOptions): Promise<GetDomainResult>
function  get_domain(name=None, opts=None)
func LookupDomain(ctx *Context, args *LookupDomainArgs, opts ...InvokeOption) (*LookupDomainResult, error)

Note: This function is named LookupDomain in the Go SDK.

public static class GetDomain {
    public static Task<GetDomainResult> InvokeAsync(GetDomainArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the domain.

Name string

The name of the domain.

name string

The name of the domain.

name str

The name of the domain.

GetDomain Result

The following output properties are available:

DomainUrn string

The uniform resource name of the domain * zone_file: The zone file of the domain.

Id string

The provider-assigned unique ID for this managed resource.

Name string
Ttl int
ZoneFile string
DomainUrn string

The uniform resource name of the domain * zone_file: The zone file of the domain.

Id string

The provider-assigned unique ID for this managed resource.

Name string
Ttl int
ZoneFile string
domainUrn string

The uniform resource name of the domain * zone_file: The zone file of the domain.

id string

The provider-assigned unique ID for this managed resource.

name string
ttl number
zoneFile string
domain_urn str

The uniform resource name of the domain * zone_file: The zone file of the domain.

id str

The provider-assigned unique ID for this managed resource.

name str
ttl float
zone_file str

Package Details

Repository
https://github.com/pulumi/pulumi-digitalocean
License
Apache-2.0
Notes
This Pulumi package is based on the digitalocean Terraform Provider.