1. Packages
  2. Tailscale Provider
  3. API Docs
  4. DnsConfiguration
Tailscale v0.22.0 published on Saturday, Sep 20, 2025 by Pulumi

tailscale.DnsConfiguration

Explore with Pulumi AI

tailscale logo
Tailscale v0.22.0 published on Saturday, Sep 20, 2025 by Pulumi

    Example Usage

    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 pulumi
    import pulumi_tailscale as tailscale
    
    sample_configuration = tailscale.DnsConfiguration("sample_configuration",
        nameservers=[
            {
                "address": "8.8.8.8",
            },
            {
                "address": "1.1.1.1",
                "use_with_exit_node": True,
            },
        ],
        split_dns=[
            {
                "domain": "foo.example.com",
                "nameservers": [
                    {
                        "address": "1.1.1.2",
                        "use_with_exit_node": True,
                    },
                    {
                        "address": "1.1.1.3",
                    },
                ],
            },
            {
                "domain": "bar.example.com",
                "nameservers": [{
                    "address": "8.8.8.2",
                    "use_with_exit_node": True,
                }],
            },
        ],
        search_paths=[
            "example.com",
            "anotherexample.com",
        ],
        override_local_dns=True,
        magic_dns=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-tailscale/sdk/go/tailscale"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tailscale.NewDnsConfiguration(ctx, "sample_configuration", &tailscale.DnsConfigurationArgs{
    			Nameservers: tailscale.DnsConfigurationNameserverArray{
    				&tailscale.DnsConfigurationNameserverArgs{
    					Address: pulumi.String("8.8.8.8"),
    				},
    				&tailscale.DnsConfigurationNameserverArgs{
    					Address:         pulumi.String("1.1.1.1"),
    					UseWithExitNode: pulumi.Bool(true),
    				},
    			},
    			SplitDns: tailscale.DnsConfigurationSplitDnArray{
    				&tailscale.DnsConfigurationSplitDnArgs{
    					Domain: pulumi.String("foo.example.com"),
    					Nameservers: tailscale.DnsConfigurationSplitDnNameserverArray{
    						&tailscale.DnsConfigurationSplitDnNameserverArgs{
    							Address:         pulumi.String("1.1.1.2"),
    							UseWithExitNode: pulumi.Bool(true),
    						},
    						&tailscale.DnsConfigurationSplitDnNameserverArgs{
    							Address: pulumi.String("1.1.1.3"),
    						},
    					},
    				},
    				&tailscale.DnsConfigurationSplitDnArgs{
    					Domain: pulumi.String("bar.example.com"),
    					Nameservers: tailscale.DnsConfigurationSplitDnNameserverArray{
    						&tailscale.DnsConfigurationSplitDnNameserverArgs{
    							Address:         pulumi.String("8.8.8.2"),
    							UseWithExitNode: pulumi.Bool(true),
    						},
    					},
    				},
    			},
    			SearchPaths: pulumi.StringArray{
    				pulumi.String("example.com"),
    				pulumi.String("anotherexample.com"),
    			},
    			OverrideLocalDns: pulumi.Bool(true),
    			MagicDns:         pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tailscale = Pulumi.Tailscale;
    
    return await Deployment.RunAsync(() => 
    {
        var sampleConfiguration = new Tailscale.DnsConfiguration("sample_configuration", new()
        {
            Nameservers = new[]
            {
                new Tailscale.Inputs.DnsConfigurationNameserverArgs
                {
                    Address = "8.8.8.8",
                },
                new Tailscale.Inputs.DnsConfigurationNameserverArgs
                {
                    Address = "1.1.1.1",
                    UseWithExitNode = true,
                },
            },
            SplitDns = new[]
            {
                new Tailscale.Inputs.DnsConfigurationSplitDnArgs
                {
                    Domain = "foo.example.com",
                    Nameservers = new[]
                    {
                        new Tailscale.Inputs.DnsConfigurationSplitDnNameserverArgs
                        {
                            Address = "1.1.1.2",
                            UseWithExitNode = true,
                        },
                        new Tailscale.Inputs.DnsConfigurationSplitDnNameserverArgs
                        {
                            Address = "1.1.1.3",
                        },
                    },
                },
                new Tailscale.Inputs.DnsConfigurationSplitDnArgs
                {
                    Domain = "bar.example.com",
                    Nameservers = new[]
                    {
                        new Tailscale.Inputs.DnsConfigurationSplitDnNameserverArgs
                        {
                            Address = "8.8.8.2",
                            UseWithExitNode = true,
                        },
                    },
                },
            },
            SearchPaths = new[]
            {
                "example.com",
                "anotherexample.com",
            },
            OverrideLocalDns = true,
            MagicDns = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tailscale.DnsConfiguration;
    import com.pulumi.tailscale.DnsConfigurationArgs;
    import com.pulumi.tailscale.inputs.DnsConfigurationNameserverArgs;
    import com.pulumi.tailscale.inputs.DnsConfigurationSplitDnArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var sampleConfiguration = new DnsConfiguration("sampleConfiguration", DnsConfigurationArgs.builder()
                .nameservers(            
                    DnsConfigurationNameserverArgs.builder()
                        .address("8.8.8.8")
                        .build(),
                    DnsConfigurationNameserverArgs.builder()
                        .address("1.1.1.1")
                        .useWithExitNode(true)
                        .build())
                .splitDns(            
                    DnsConfigurationSplitDnArgs.builder()
                        .domain("foo.example.com")
                        .nameservers(                    
                            DnsConfigurationSplitDnNameserverArgs.builder()
                                .address("1.1.1.2")
                                .useWithExitNode(true)
                                .build(),
                            DnsConfigurationSplitDnNameserverArgs.builder()
                                .address("1.1.1.3")
                                .build())
                        .build(),
                    DnsConfigurationSplitDnArgs.builder()
                        .domain("bar.example.com")
                        .nameservers(DnsConfigurationSplitDnNameserverArgs.builder()
                            .address("8.8.8.2")
                            .useWithExitNode(true)
                            .build())
                        .build())
                .searchPaths(            
                    "example.com",
                    "anotherexample.com")
                .overrideLocalDns(true)
                .magicDns(true)
                .build());
    
        }
    }
    
    resources:
      sampleConfiguration:
        type: tailscale:DnsConfiguration
        name: sample_configuration
        properties:
          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
    

    Create DnsConfiguration Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DnsConfiguration(name: string, args?: DnsConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def DnsConfiguration(resource_name: str,
                         args: Optional[DnsConfigurationArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def DnsConfiguration(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         magic_dns: Optional[bool] = None,
                         nameservers: Optional[Sequence[DnsConfigurationNameserverArgs]] = None,
                         override_local_dns: Optional[bool] = None,
                         search_paths: Optional[Sequence[str]] = None,
                         split_dns: Optional[Sequence[DnsConfigurationSplitDnArgs]] = None)
    func NewDnsConfiguration(ctx *Context, name string, args *DnsConfigurationArgs, opts ...ResourceOption) (*DnsConfiguration, error)
    public DnsConfiguration(string name, DnsConfigurationArgs? args = null, CustomResourceOptions? opts = null)
    public DnsConfiguration(String name, DnsConfigurationArgs args)
    public DnsConfiguration(String name, DnsConfigurationArgs args, CustomResourceOptions options)
    
    type: tailscale:DnsConfiguration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DnsConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args DnsConfigurationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args DnsConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DnsConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DnsConfigurationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var dnsConfigurationResource = new Tailscale.DnsConfiguration("dnsConfigurationResource", new()
    {
        MagicDns = false,
        Nameservers = new[]
        {
            new Tailscale.Inputs.DnsConfigurationNameserverArgs
            {
                Address = "string",
                UseWithExitNode = false,
            },
        },
        OverrideLocalDns = false,
        SearchPaths = new[]
        {
            "string",
        },
        SplitDns = new[]
        {
            new Tailscale.Inputs.DnsConfigurationSplitDnArgs
            {
                Domain = "string",
                Nameservers = new[]
                {
                    new Tailscale.Inputs.DnsConfigurationSplitDnNameserverArgs
                    {
                        Address = "string",
                        UseWithExitNode = false,
                    },
                },
            },
        },
    });
    
    example, err := tailscale.NewDnsConfiguration(ctx, "dnsConfigurationResource", &tailscale.DnsConfigurationArgs{
    	MagicDns: pulumi.Bool(false),
    	Nameservers: tailscale.DnsConfigurationNameserverArray{
    		&tailscale.DnsConfigurationNameserverArgs{
    			Address:         pulumi.String("string"),
    			UseWithExitNode: pulumi.Bool(false),
    		},
    	},
    	OverrideLocalDns: pulumi.Bool(false),
    	SearchPaths: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SplitDns: tailscale.DnsConfigurationSplitDnArray{
    		&tailscale.DnsConfigurationSplitDnArgs{
    			Domain: pulumi.String("string"),
    			Nameservers: tailscale.DnsConfigurationSplitDnNameserverArray{
    				&tailscale.DnsConfigurationSplitDnNameserverArgs{
    					Address:         pulumi.String("string"),
    					UseWithExitNode: pulumi.Bool(false),
    				},
    			},
    		},
    	},
    })
    
    var dnsConfigurationResource = new DnsConfiguration("dnsConfigurationResource", DnsConfigurationArgs.builder()
        .magicDns(false)
        .nameservers(DnsConfigurationNameserverArgs.builder()
            .address("string")
            .useWithExitNode(false)
            .build())
        .overrideLocalDns(false)
        .searchPaths("string")
        .splitDns(DnsConfigurationSplitDnArgs.builder()
            .domain("string")
            .nameservers(DnsConfigurationSplitDnNameserverArgs.builder()
                .address("string")
                .useWithExitNode(false)
                .build())
            .build())
        .build());
    
    dns_configuration_resource = tailscale.DnsConfiguration("dnsConfigurationResource",
        magic_dns=False,
        nameservers=[{
            "address": "string",
            "use_with_exit_node": False,
        }],
        override_local_dns=False,
        search_paths=["string"],
        split_dns=[{
            "domain": "string",
            "nameservers": [{
                "address": "string",
                "use_with_exit_node": False,
            }],
        }])
    
    const dnsConfigurationResource = new tailscale.DnsConfiguration("dnsConfigurationResource", {
        magicDns: false,
        nameservers: [{
            address: "string",
            useWithExitNode: false,
        }],
        overrideLocalDns: false,
        searchPaths: ["string"],
        splitDns: [{
            domain: "string",
            nameservers: [{
                address: "string",
                useWithExitNode: false,
            }],
        }],
    });
    
    type: tailscale:DnsConfiguration
    properties:
        magicDns: false
        nameservers:
            - address: string
              useWithExitNode: false
        overrideLocalDns: false
        searchPaths:
            - string
        splitDns:
            - domain: string
              nameservers:
                - address: string
                  useWithExitNode: false
    

    DnsConfiguration Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DnsConfiguration resource accepts the following input properties:

    MagicDns bool
    Whether or not to enable MagicDNS. Defaults to true.
    Nameservers List<DnsConfigurationNameserver>
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    OverrideLocalDns bool
    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.
    SearchPaths List<string>
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    SplitDns List<DnsConfigurationSplitDn>
    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 override_local_dns.
    MagicDns bool
    Whether or not to enable MagicDNS. Defaults to true.
    Nameservers []DnsConfigurationNameserverArgs
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    OverrideLocalDns bool
    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.
    SearchPaths []string
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    SplitDns []DnsConfigurationSplitDnArgs
    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 override_local_dns.
    magicDns Boolean
    Whether or not to enable MagicDNS. Defaults to true.
    nameservers List<DnsConfigurationNameserver>
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    overrideLocalDns Boolean
    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.
    searchPaths List<String>
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    splitDns List<DnsConfigurationSplitDn>
    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 override_local_dns.
    magicDns boolean
    Whether or not to enable MagicDNS. Defaults to true.
    nameservers DnsConfigurationNameserver[]
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    overrideLocalDns boolean
    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.
    searchPaths string[]
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    splitDns DnsConfigurationSplitDn[]
    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 override_local_dns.
    magic_dns bool
    Whether or not to enable MagicDNS. Defaults to true.
    nameservers Sequence[DnsConfigurationNameserverArgs]
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    override_local_dns bool
    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.
    search_paths Sequence[str]
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    split_dns Sequence[DnsConfigurationSplitDnArgs]
    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 override_local_dns.
    magicDns Boolean
    Whether or not to enable MagicDNS. Defaults to true.
    nameservers List<Property Map>
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    overrideLocalDns Boolean
    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.
    searchPaths List<String>
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    splitDns List<Property Map>
    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 override_local_dns.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DnsConfiguration resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DnsConfiguration Resource

    Get an existing DnsConfiguration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DnsConfigurationState, opts?: CustomResourceOptions): DnsConfiguration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            magic_dns: Optional[bool] = None,
            nameservers: Optional[Sequence[DnsConfigurationNameserverArgs]] = None,
            override_local_dns: Optional[bool] = None,
            search_paths: Optional[Sequence[str]] = None,
            split_dns: Optional[Sequence[DnsConfigurationSplitDnArgs]] = None) -> DnsConfiguration
    func GetDnsConfiguration(ctx *Context, name string, id IDInput, state *DnsConfigurationState, opts ...ResourceOption) (*DnsConfiguration, error)
    public static DnsConfiguration Get(string name, Input<string> id, DnsConfigurationState? state, CustomResourceOptions? opts = null)
    public static DnsConfiguration get(String name, Output<String> id, DnsConfigurationState state, CustomResourceOptions options)
    resources:  _:    type: tailscale:DnsConfiguration    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    MagicDns bool
    Whether or not to enable MagicDNS. Defaults to true.
    Nameservers List<DnsConfigurationNameserver>
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    OverrideLocalDns bool
    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.
    SearchPaths List<string>
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    SplitDns List<DnsConfigurationSplitDn>
    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 override_local_dns.
    MagicDns bool
    Whether or not to enable MagicDNS. Defaults to true.
    Nameservers []DnsConfigurationNameserverArgs
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    OverrideLocalDns bool
    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.
    SearchPaths []string
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    SplitDns []DnsConfigurationSplitDnArgs
    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 override_local_dns.
    magicDns Boolean
    Whether or not to enable MagicDNS. Defaults to true.
    nameservers List<DnsConfigurationNameserver>
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    overrideLocalDns Boolean
    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.
    searchPaths List<String>
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    splitDns List<DnsConfigurationSplitDn>
    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 override_local_dns.
    magicDns boolean
    Whether or not to enable MagicDNS. Defaults to true.
    nameservers DnsConfigurationNameserver[]
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    overrideLocalDns boolean
    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.
    searchPaths string[]
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    splitDns DnsConfigurationSplitDn[]
    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 override_local_dns.
    magic_dns bool
    Whether or not to enable MagicDNS. Defaults to true.
    nameservers Sequence[DnsConfigurationNameserverArgs]
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    override_local_dns bool
    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.
    search_paths Sequence[str]
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    split_dns Sequence[DnsConfigurationSplitDnArgs]
    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 override_local_dns.
    magicDns Boolean
    Whether or not to enable MagicDNS. Defaults to true.
    nameservers List<Property Map>
    Set the nameservers used by devices on your network to resolve DNS queries. override_local_dns must also be true to prefer these nameservers over local DNS configuration.
    overrideLocalDns Boolean
    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.
    searchPaths List<String>
    Additional search domains. When MagicDNS is on, the tailnet domain is automatically included as the first search domain.
    splitDns List<Property Map>
    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 override_local_dns.

    Supporting Types

    DnsConfigurationNameserver, DnsConfigurationNameserverArgs

    Address string
    The nameserver's IPv4 or IPv6 address
    UseWithExitNode bool
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.
    Address string
    The nameserver's IPv4 or IPv6 address
    UseWithExitNode bool
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.
    address String
    The nameserver's IPv4 or IPv6 address
    useWithExitNode Boolean
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.
    address string
    The nameserver's IPv4 or IPv6 address
    useWithExitNode boolean
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.
    address str
    The nameserver's IPv4 or IPv6 address
    use_with_exit_node bool
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.
    address String
    The nameserver's IPv4 or IPv6 address
    useWithExitNode Boolean
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.

    DnsConfigurationSplitDn, DnsConfigurationSplitDnArgs

    Domain string
    The nameservers will be used only for this domain.
    Nameservers List<DnsConfigurationSplitDnNameserver>
    Set the nameservers used by devices on your network to resolve DNS queries.
    Domain string
    The nameservers will be used only for this domain.
    Nameservers []DnsConfigurationSplitDnNameserver
    Set the nameservers used by devices on your network to resolve DNS queries.
    domain String
    The nameservers will be used only for this domain.
    nameservers List<DnsConfigurationSplitDnNameserver>
    Set the nameservers used by devices on your network to resolve DNS queries.
    domain string
    The nameservers will be used only for this domain.
    nameservers DnsConfigurationSplitDnNameserver[]
    Set the nameservers used by devices on your network to resolve DNS queries.
    domain str
    The nameservers will be used only for this domain.
    nameservers Sequence[DnsConfigurationSplitDnNameserver]
    Set the nameservers used by devices on your network to resolve DNS queries.
    domain String
    The nameservers will be used only for this domain.
    nameservers List<Property Map>
    Set the nameservers used by devices on your network to resolve DNS queries.

    DnsConfigurationSplitDnNameserver, DnsConfigurationSplitDnNameserverArgs

    Address string
    The nameserver's IPv4 or IPv6 address.
    UseWithExitNode bool
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.
    Address string
    The nameserver's IPv4 or IPv6 address.
    UseWithExitNode bool
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.
    address String
    The nameserver's IPv4 or IPv6 address.
    useWithExitNode Boolean
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.
    address string
    The nameserver's IPv4 or IPv6 address.
    useWithExitNode boolean
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.
    address str
    The nameserver's IPv4 or IPv6 address.
    use_with_exit_node bool
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.
    address String
    The nameserver's IPv4 or IPv6 address.
    useWithExitNode Boolean
    This nameserver will continue to be used when an exit node is selected (requires Tailscale v1.88.1 or later). Defaults to false.

    Import

    ID doesn’t matter.

    $ pulumi import tailscale:index/dnsConfiguration:DnsConfiguration sample_configuration dns_configuration
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    tailscale pulumi/pulumi-tailscale
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the tailscale Terraform Provider.
    tailscale logo
    Tailscale v0.22.0 published on Saturday, Sep 20, 2025 by Pulumi
      AI Agentic Workflows: Register now