1. Packages
  2. Tailscale
  3. API Docs
  4. DnsSplitNameservers
Tailscale v0.16.0 published on Monday, May 6, 2024 by Pulumi

tailscale.DnsSplitNameservers

Explore with Pulumi AI

tailscale logo
Tailscale v0.16.0 published on Monday, May 6, 2024 by Pulumi

    The dns_split_nameservers resource allows you to configure split DNS nameservers for your Tailscale network. See https://tailscale.com/kb/1054/dns for more information.

    Example Usage

    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 pulumi
    import pulumi_tailscale as tailscale
    
    sample_split_nameservers = tailscale.DnsSplitNameservers("sample_split_nameservers",
        domain="foo.example.com",
        nameservers=["1.1.1.1"])
    
    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.NewDnsSplitNameservers(ctx, "sample_split_nameservers", &tailscale.DnsSplitNameserversArgs{
    			Domain: pulumi.String("foo.example.com"),
    			Nameservers: pulumi.StringArray{
    				pulumi.String("1.1.1.1"),
    			},
    		})
    		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 sampleSplitNameservers = new Tailscale.DnsSplitNameservers("sample_split_nameservers", new()
        {
            Domain = "foo.example.com",
            Nameservers = new[]
            {
                "1.1.1.1",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tailscale.DnsSplitNameservers;
    import com.pulumi.tailscale.DnsSplitNameserversArgs;
    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 sampleSplitNameservers = new DnsSplitNameservers("sampleSplitNameservers", DnsSplitNameserversArgs.builder()        
                .domain("foo.example.com")
                .nameservers("1.1.1.1")
                .build());
    
        }
    }
    
    resources:
      sampleSplitNameservers:
        type: tailscale:DnsSplitNameservers
        name: sample_split_nameservers
        properties:
          domain: foo.example.com
          nameservers:
            - 1.1.1.1
    

    Create DnsSplitNameservers Resource

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

    Constructor syntax

    new DnsSplitNameservers(name: string, args: DnsSplitNameserversArgs, opts?: CustomResourceOptions);
    @overload
    def DnsSplitNameservers(resource_name: str,
                            args: DnsSplitNameserversArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def DnsSplitNameservers(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            domain: Optional[str] = None,
                            nameservers: Optional[Sequence[str]] = None)
    func NewDnsSplitNameservers(ctx *Context, name string, args DnsSplitNameserversArgs, opts ...ResourceOption) (*DnsSplitNameservers, error)
    public DnsSplitNameservers(string name, DnsSplitNameserversArgs args, CustomResourceOptions? opts = null)
    public DnsSplitNameservers(String name, DnsSplitNameserversArgs args)
    public DnsSplitNameservers(String name, DnsSplitNameserversArgs args, CustomResourceOptions options)
    
    type: tailscale:DnsSplitNameservers
    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 DnsSplitNameserversArgs
    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 DnsSplitNameserversArgs
    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 DnsSplitNameserversArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DnsSplitNameserversArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DnsSplitNameserversArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var dnsSplitNameserversResource = new Tailscale.DnsSplitNameservers("dnsSplitNameserversResource", new()
    {
        Domain = "string",
        Nameservers = new[]
        {
            "string",
        },
    });
    
    example, err := tailscale.NewDnsSplitNameservers(ctx, "dnsSplitNameserversResource", &tailscale.DnsSplitNameserversArgs{
    	Domain: pulumi.String("string"),
    	Nameservers: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var dnsSplitNameserversResource = new DnsSplitNameservers("dnsSplitNameserversResource", DnsSplitNameserversArgs.builder()        
        .domain("string")
        .nameservers("string")
        .build());
    
    dns_split_nameservers_resource = tailscale.DnsSplitNameservers("dnsSplitNameserversResource",
        domain="string",
        nameservers=["string"])
    
    const dnsSplitNameserversResource = new tailscale.DnsSplitNameservers("dnsSplitNameserversResource", {
        domain: "string",
        nameservers: ["string"],
    });
    
    type: tailscale:DnsSplitNameservers
    properties:
        domain: string
        nameservers:
            - string
    

    DnsSplitNameservers Resource Properties

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

    Inputs

    The DnsSplitNameservers resource accepts the following input properties:

    Domain string
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    Nameservers List<string>
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.
    Domain string
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    Nameservers []string
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.
    domain String
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    nameservers List<String>
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.
    domain string
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    nameservers string[]
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.
    domain str
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    nameservers Sequence[str]
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.
    domain String
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    nameservers List<String>
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DnsSplitNameservers 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 DnsSplitNameservers Resource

    Get an existing DnsSplitNameservers 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?: DnsSplitNameserversState, opts?: CustomResourceOptions): DnsSplitNameservers
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domain: Optional[str] = None,
            nameservers: Optional[Sequence[str]] = None) -> DnsSplitNameservers
    func GetDnsSplitNameservers(ctx *Context, name string, id IDInput, state *DnsSplitNameserversState, opts ...ResourceOption) (*DnsSplitNameservers, error)
    public static DnsSplitNameservers Get(string name, Input<string> id, DnsSplitNameserversState? state, CustomResourceOptions? opts = null)
    public static DnsSplitNameservers get(String name, Output<String> id, DnsSplitNameserversState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Domain string
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    Nameservers List<string>
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.
    Domain string
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    Nameservers []string
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.
    domain String
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    nameservers List<String>
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.
    domain string
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    nameservers string[]
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.
    domain str
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    nameservers Sequence[str]
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.
    domain String
    Domain to configure split DNS for. Requests for this domain will be resolved using the provided nameservers.
    nameservers List<String>
    Devices on your network will use these nameservers to resolve DNS names. IPv4 or IPv6 addresses are accepted.

    Import

    Split DNS nameservers can be imported using the domain name, e.g.

    $ pulumi import tailscale:index/dnsSplitNameservers:DnsSplitNameservers sample_split_nameservers example.com
    

    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.16.0 published on Monday, May 6, 2024 by Pulumi