UNPKG

@pulumi/tailscale

Version:

A Pulumi package for creating and managing Tailscale cloud resources.

80 lines 3.37 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.DnsSplitNameservers = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * The dnsSplitNameservers resource allows you to configure split DNS nameservers for your Tailscale network. See https://tailscale.com/kb/1054/dns for more information. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as tailscale from "@pulumi/tailscale"; * * const sampleSplitNameservers = new tailscale.DnsSplitNameservers("sample_split_nameservers", { * domain: "foo.example.com", * nameservers: ["1.1.1.1"], * }); * ``` * * ## Import * * Split DNS nameservers can be imported using the domain name, e.g. * * ```sh * $ pulumi import tailscale:index/dnsSplitNameservers:DnsSplitNameservers sample_split_nameservers example.com * ``` */ class DnsSplitNameservers extends pulumi.CustomResource { /** * Get an existing DnsSplitNameservers resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new DnsSplitNameservers(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DnsSplitNameservers. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === DnsSplitNameservers.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["domain"] = state ? state.domain : undefined; resourceInputs["nameservers"] = state ? state.nameservers : undefined; } else { const args = argsOrState; if ((!args || args.domain === undefined) && !opts.urn) { throw new Error("Missing required property 'domain'"); } if ((!args || args.nameservers === undefined) && !opts.urn) { throw new Error("Missing required property 'nameservers'"); } resourceInputs["domain"] = args ? args.domain : undefined; resourceInputs["nameservers"] = args ? args.nameservers : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DnsSplitNameservers.__pulumiType, name, resourceInputs, opts); } } exports.DnsSplitNameservers = DnsSplitNameservers; /** @internal */ DnsSplitNameservers.__pulumiType = 'tailscale:index/dnsSplitNameservers:DnsSplitNameservers'; //# sourceMappingURL=dnsSplitNameservers.js.map