UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

68 lines 2.4 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getDomainOutput = exports.getDomain = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * 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 * * Get the zone file for a domain: * * ```typescript * 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); * ``` */ function getDomain(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("digitalocean:index/getDomain:getDomain", { "name": args.name, }, opts); } exports.getDomain = 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 * * Get the zone file for a domain: * * ```typescript * 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); * ``` */ function getDomainOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("digitalocean:index/getDomain:getDomain", { "name": args.name, }, opts); } exports.getDomainOutput = getDomainOutput; //# sourceMappingURL=getDomain.js.map