@pulumi/tailscale
Version:
A Pulumi package for creating and managing Tailscale cloud resources.
154 lines (153 loc) • 6.51 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* ## 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
* ```
*/
export declare 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: string, id: pulumi.Input<pulumi.ID>, state?: DnsConfigurationState, opts?: pulumi.CustomResourceOptions): DnsConfiguration;
/**
* 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: any): obj is DnsConfiguration;
/**
* Whether or not to enable MagicDNS. Defaults to true.
*/
readonly magicDns: pulumi.Output<boolean | undefined>;
/**
* Set the nameservers used by devices on your network to resolve DNS queries. `overrideLocalDns` must also be true to prefer these nameservers over local DNS configuration.
*/
readonly nameservers: pulumi.Output<outputs.DnsConfigurationNameserver[] | undefined>;
/**
* When enabled, use the configured DNS servers in `nameservers` to resolve names outside the tailnet. When disabled, devices will prefer their local DNS configuration. Defaults to false.
*/
readonly overrideLocalDns: pulumi.Output<boolean | undefined>;
/**
* Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
*/
readonly searchPaths: pulumi.Output<string[] | undefined>;
/**
* Set the nameservers used by devices on your network to resolve DNS queries on specific domains (requires Tailscale v1.8 or later). Configuration does not depend on `overrideLocalDns`.
*/
readonly splitDns: pulumi.Output<outputs.DnsConfigurationSplitDn[] | undefined>;
/**
* Create a DnsConfiguration resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: DnsConfigurationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DnsConfiguration resources.
*/
export interface DnsConfigurationState {
/**
* Whether or not to enable MagicDNS. Defaults to true.
*/
magicDns?: pulumi.Input<boolean>;
/**
* Set the nameservers used by devices on your network to resolve DNS queries. `overrideLocalDns` must also be true to prefer these nameservers over local DNS configuration.
*/
nameservers?: pulumi.Input<pulumi.Input<inputs.DnsConfigurationNameserver>[]>;
/**
* When enabled, use the configured DNS servers in `nameservers` to resolve names outside the tailnet. When disabled, devices will prefer their local DNS configuration. Defaults to false.
*/
overrideLocalDns?: pulumi.Input<boolean>;
/**
* Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
*/
searchPaths?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Set the nameservers used by devices on your network to resolve DNS queries on specific domains (requires Tailscale v1.8 or later). Configuration does not depend on `overrideLocalDns`.
*/
splitDns?: pulumi.Input<pulumi.Input<inputs.DnsConfigurationSplitDn>[]>;
}
/**
* The set of arguments for constructing a DnsConfiguration resource.
*/
export interface DnsConfigurationArgs {
/**
* Whether or not to enable MagicDNS. Defaults to true.
*/
magicDns?: pulumi.Input<boolean>;
/**
* Set the nameservers used by devices on your network to resolve DNS queries. `overrideLocalDns` must also be true to prefer these nameservers over local DNS configuration.
*/
nameservers?: pulumi.Input<pulumi.Input<inputs.DnsConfigurationNameserver>[]>;
/**
* When enabled, use the configured DNS servers in `nameservers` to resolve names outside the tailnet. When disabled, devices will prefer their local DNS configuration. Defaults to false.
*/
overrideLocalDns?: pulumi.Input<boolean>;
/**
* Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
*/
searchPaths?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Set the nameservers used by devices on your network to resolve DNS queries on specific domains (requires Tailscale v1.8 or later). Configuration does not depend on `overrideLocalDns`.
*/
splitDns?: pulumi.Input<pulumi.Input<inputs.DnsConfigurationSplitDn>[]>;
}