@pulumi/tailscale
Version:
A Pulumi package for creating and managing Tailscale cloud resources.
112 lines • 3.91 kB
JavaScript
;
// *** 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.DnsConfiguration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as tailscale from "@pulumi/tailscale";
*
* const sampleConfiguration = new tailscale.DnsConfiguration("sample_configuration", {
* nameservers: [
* {
* address: "8.8.8.8",
* },
* {
* address: "1.1.1.1",
* useWithExitNode: true,
* },
* ],
* splitDns: [
* {
* domain: "foo.example.com",
* nameservers: [
* {
* address: "1.1.1.2",
* useWithExitNode: true,
* },
* {
* address: "1.1.1.3",
* },
* ],
* },
* {
* domain: "bar.example.com",
* nameservers: [{
* address: "8.8.8.2",
* useWithExitNode: true,
* }],
* },
* ],
* searchPaths: [
* "example.com",
* "anotherexample.com",
* ],
* overrideLocalDns: true,
* magicDns: true,
* });
* ```
*
* ## Import
*
* ID doesn't matter.
*
* ```sh
* $ pulumi import tailscale:index/dnsConfiguration:DnsConfiguration sample_configuration dns_configuration
* ```
*/
class DnsConfiguration extends pulumi.CustomResource {
/**
* Get an existing DnsConfiguration 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 DnsConfiguration(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of DnsConfiguration. 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'] === DnsConfiguration.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["magicDns"] = state?.magicDns;
resourceInputs["nameservers"] = state?.nameservers;
resourceInputs["overrideLocalDns"] = state?.overrideLocalDns;
resourceInputs["searchPaths"] = state?.searchPaths;
resourceInputs["splitDns"] = state?.splitDns;
}
else {
const args = argsOrState;
resourceInputs["magicDns"] = args?.magicDns;
resourceInputs["nameservers"] = args?.nameservers;
resourceInputs["overrideLocalDns"] = args?.overrideLocalDns;
resourceInputs["searchPaths"] = args?.searchPaths;
resourceInputs["splitDns"] = args?.splitDns;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DnsConfiguration.__pulumiType, name, resourceInputs, opts);
}
}
exports.DnsConfiguration = DnsConfiguration;
/** @internal */
DnsConfiguration.__pulumiType = 'tailscale:index/dnsConfiguration:DnsConfiguration';
//# sourceMappingURL=dnsConfiguration.js.map