1. Packages
  2. Tailscale
  3. API Docs
  4. TailnetSettings
Tailscale v0.17.1 published on Monday, Sep 23, 2024 by Pulumi

tailscale.TailnetSettings

Explore with Pulumi AI

tailscale logo
Tailscale v0.17.1 published on Monday, Sep 23, 2024 by Pulumi

    The tailnet_settings resource allows you to configure settings for your tailnet. See https://tailscale.com/api#tag/tailnetsettings for more information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tailscale from "@pulumi/tailscale";
    
    const sampleTailnetSettings = new tailscale.TailnetSettings("sample_tailnet_settings", {
        devicesApprovalOn: true,
        devicesAutoUpdatesOn: true,
        devicesKeyDurationDays: 5,
        usersApprovalOn: true,
        usersRoleAllowedToJoinExternalTailnet: "member",
        postureIdentityCollectionOn: true,
    });
    
    import pulumi
    import pulumi_tailscale as tailscale
    
    sample_tailnet_settings = tailscale.TailnetSettings("sample_tailnet_settings",
        devices_approval_on=True,
        devices_auto_updates_on=True,
        devices_key_duration_days=5,
        users_approval_on=True,
        users_role_allowed_to_join_external_tailnet="member",
        posture_identity_collection_on=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.NewTailnetSettings(ctx, "sample_tailnet_settings", &tailscale.TailnetSettingsArgs{
    			DevicesApprovalOn:                     pulumi.Bool(true),
    			DevicesAutoUpdatesOn:                  pulumi.Bool(true),
    			DevicesKeyDurationDays:                pulumi.Int(5),
    			UsersApprovalOn:                       pulumi.Bool(true),
    			UsersRoleAllowedToJoinExternalTailnet: pulumi.String("member"),
    			PostureIdentityCollectionOn:           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 sampleTailnetSettings = new Tailscale.TailnetSettings("sample_tailnet_settings", new()
        {
            DevicesApprovalOn = true,
            DevicesAutoUpdatesOn = true,
            DevicesKeyDurationDays = 5,
            UsersApprovalOn = true,
            UsersRoleAllowedToJoinExternalTailnet = "member",
            PostureIdentityCollectionOn = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tailscale.TailnetSettings;
    import com.pulumi.tailscale.TailnetSettingsArgs;
    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 sampleTailnetSettings = new TailnetSettings("sampleTailnetSettings", TailnetSettingsArgs.builder()
                .devicesApprovalOn(true)
                .devicesAutoUpdatesOn(true)
                .devicesKeyDurationDays(5)
                .usersApprovalOn(true)
                .usersRoleAllowedToJoinExternalTailnet("member")
                .postureIdentityCollectionOn(true)
                .build());
    
        }
    }
    
    resources:
      sampleTailnetSettings:
        type: tailscale:TailnetSettings
        name: sample_tailnet_settings
        properties:
          devicesApprovalOn: true
          devicesAutoUpdatesOn: true
          devicesKeyDurationDays: 5
          usersApprovalOn: true
          usersRoleAllowedToJoinExternalTailnet: member
          postureIdentityCollectionOn: true
    

    Create TailnetSettings Resource

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

    Constructor syntax

    new TailnetSettings(name: string, args?: TailnetSettingsArgs, opts?: CustomResourceOptions);
    @overload
    def TailnetSettings(resource_name: str,
                        args: Optional[TailnetSettingsArgs] = None,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def TailnetSettings(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        devices_approval_on: Optional[bool] = None,
                        devices_auto_updates_on: Optional[bool] = None,
                        devices_key_duration_days: Optional[int] = None,
                        network_flow_logging_on: Optional[bool] = None,
                        posture_identity_collection_on: Optional[bool] = None,
                        regional_routing_on: Optional[bool] = None,
                        users_approval_on: Optional[bool] = None,
                        users_role_allowed_to_join_external_tailnet: Optional[str] = None)
    func NewTailnetSettings(ctx *Context, name string, args *TailnetSettingsArgs, opts ...ResourceOption) (*TailnetSettings, error)
    public TailnetSettings(string name, TailnetSettingsArgs? args = null, CustomResourceOptions? opts = null)
    public TailnetSettings(String name, TailnetSettingsArgs args)
    public TailnetSettings(String name, TailnetSettingsArgs args, CustomResourceOptions options)
    
    type: tailscale:TailnetSettings
    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 TailnetSettingsArgs
    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 TailnetSettingsArgs
    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 TailnetSettingsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TailnetSettingsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TailnetSettingsArgs
    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 tailnetSettingsResource = new Tailscale.TailnetSettings("tailnetSettingsResource", new()
    {
        DevicesApprovalOn = false,
        DevicesAutoUpdatesOn = false,
        DevicesKeyDurationDays = 0,
        NetworkFlowLoggingOn = false,
        PostureIdentityCollectionOn = false,
        RegionalRoutingOn = false,
        UsersApprovalOn = false,
        UsersRoleAllowedToJoinExternalTailnet = "string",
    });
    
    example, err := tailscale.NewTailnetSettings(ctx, "tailnetSettingsResource", &tailscale.TailnetSettingsArgs{
    	DevicesApprovalOn:                     pulumi.Bool(false),
    	DevicesAutoUpdatesOn:                  pulumi.Bool(false),
    	DevicesKeyDurationDays:                pulumi.Int(0),
    	NetworkFlowLoggingOn:                  pulumi.Bool(false),
    	PostureIdentityCollectionOn:           pulumi.Bool(false),
    	RegionalRoutingOn:                     pulumi.Bool(false),
    	UsersApprovalOn:                       pulumi.Bool(false),
    	UsersRoleAllowedToJoinExternalTailnet: pulumi.String("string"),
    })
    
    var tailnetSettingsResource = new TailnetSettings("tailnetSettingsResource", TailnetSettingsArgs.builder()
        .devicesApprovalOn(false)
        .devicesAutoUpdatesOn(false)
        .devicesKeyDurationDays(0)
        .networkFlowLoggingOn(false)
        .postureIdentityCollectionOn(false)
        .regionalRoutingOn(false)
        .usersApprovalOn(false)
        .usersRoleAllowedToJoinExternalTailnet("string")
        .build());
    
    tailnet_settings_resource = tailscale.TailnetSettings("tailnetSettingsResource",
        devices_approval_on=False,
        devices_auto_updates_on=False,
        devices_key_duration_days=0,
        network_flow_logging_on=False,
        posture_identity_collection_on=False,
        regional_routing_on=False,
        users_approval_on=False,
        users_role_allowed_to_join_external_tailnet="string")
    
    const tailnetSettingsResource = new tailscale.TailnetSettings("tailnetSettingsResource", {
        devicesApprovalOn: false,
        devicesAutoUpdatesOn: false,
        devicesKeyDurationDays: 0,
        networkFlowLoggingOn: false,
        postureIdentityCollectionOn: false,
        regionalRoutingOn: false,
        usersApprovalOn: false,
        usersRoleAllowedToJoinExternalTailnet: "string",
    });
    
    type: tailscale:TailnetSettings
    properties:
        devicesApprovalOn: false
        devicesAutoUpdatesOn: false
        devicesKeyDurationDays: 0
        networkFlowLoggingOn: false
        postureIdentityCollectionOn: false
        regionalRoutingOn: false
        usersApprovalOn: false
        usersRoleAllowedToJoinExternalTailnet: string
    

    TailnetSettings 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 TailnetSettings resource accepts the following input properties:

    DevicesApprovalOn bool
    Whether device approval is enabled for the tailnet
    DevicesAutoUpdatesOn bool
    Whether auto updates are enabled for devices that belong to this tailnet
    DevicesKeyDurationDays int
    The key expiry duration for devices on this tailnet
    NetworkFlowLoggingOn bool
    Whether network flog logs are enabled for the tailnet
    PostureIdentityCollectionOn bool
    Whether identity collection is enabled for device posture integrations for the tailnet
    RegionalRoutingOn bool
    Whether regional routing is enabled for the tailnet
    UsersApprovalOn bool
    Whether user approval is enabled for this tailnet
    UsersRoleAllowedToJoinExternalTailnet string
    Which user roles are allowed to join external tailnets
    DevicesApprovalOn bool
    Whether device approval is enabled for the tailnet
    DevicesAutoUpdatesOn bool
    Whether auto updates are enabled for devices that belong to this tailnet
    DevicesKeyDurationDays int
    The key expiry duration for devices on this tailnet
    NetworkFlowLoggingOn bool
    Whether network flog logs are enabled for the tailnet
    PostureIdentityCollectionOn bool
    Whether identity collection is enabled for device posture integrations for the tailnet
    RegionalRoutingOn bool
    Whether regional routing is enabled for the tailnet
    UsersApprovalOn bool
    Whether user approval is enabled for this tailnet
    UsersRoleAllowedToJoinExternalTailnet string
    Which user roles are allowed to join external tailnets
    devicesApprovalOn Boolean
    Whether device approval is enabled for the tailnet
    devicesAutoUpdatesOn Boolean
    Whether auto updates are enabled for devices that belong to this tailnet
    devicesKeyDurationDays Integer
    The key expiry duration for devices on this tailnet
    networkFlowLoggingOn Boolean
    Whether network flog logs are enabled for the tailnet
    postureIdentityCollectionOn Boolean
    Whether identity collection is enabled for device posture integrations for the tailnet
    regionalRoutingOn Boolean
    Whether regional routing is enabled for the tailnet
    usersApprovalOn Boolean
    Whether user approval is enabled for this tailnet
    usersRoleAllowedToJoinExternalTailnet String
    Which user roles are allowed to join external tailnets
    devicesApprovalOn boolean
    Whether device approval is enabled for the tailnet
    devicesAutoUpdatesOn boolean
    Whether auto updates are enabled for devices that belong to this tailnet
    devicesKeyDurationDays number
    The key expiry duration for devices on this tailnet
    networkFlowLoggingOn boolean
    Whether network flog logs are enabled for the tailnet
    postureIdentityCollectionOn boolean
    Whether identity collection is enabled for device posture integrations for the tailnet
    regionalRoutingOn boolean
    Whether regional routing is enabled for the tailnet
    usersApprovalOn boolean
    Whether user approval is enabled for this tailnet
    usersRoleAllowedToJoinExternalTailnet string
    Which user roles are allowed to join external tailnets
    devices_approval_on bool
    Whether device approval is enabled for the tailnet
    devices_auto_updates_on bool
    Whether auto updates are enabled for devices that belong to this tailnet
    devices_key_duration_days int
    The key expiry duration for devices on this tailnet
    network_flow_logging_on bool
    Whether network flog logs are enabled for the tailnet
    posture_identity_collection_on bool
    Whether identity collection is enabled for device posture integrations for the tailnet
    regional_routing_on bool
    Whether regional routing is enabled for the tailnet
    users_approval_on bool
    Whether user approval is enabled for this tailnet
    users_role_allowed_to_join_external_tailnet str
    Which user roles are allowed to join external tailnets
    devicesApprovalOn Boolean
    Whether device approval is enabled for the tailnet
    devicesAutoUpdatesOn Boolean
    Whether auto updates are enabled for devices that belong to this tailnet
    devicesKeyDurationDays Number
    The key expiry duration for devices on this tailnet
    networkFlowLoggingOn Boolean
    Whether network flog logs are enabled for the tailnet
    postureIdentityCollectionOn Boolean
    Whether identity collection is enabled for device posture integrations for the tailnet
    regionalRoutingOn Boolean
    Whether regional routing is enabled for the tailnet
    usersApprovalOn Boolean
    Whether user approval is enabled for this tailnet
    usersRoleAllowedToJoinExternalTailnet String
    Which user roles are allowed to join external tailnets

    Outputs

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

    Get an existing TailnetSettings 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?: TailnetSettingsState, opts?: CustomResourceOptions): TailnetSettings
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            devices_approval_on: Optional[bool] = None,
            devices_auto_updates_on: Optional[bool] = None,
            devices_key_duration_days: Optional[int] = None,
            network_flow_logging_on: Optional[bool] = None,
            posture_identity_collection_on: Optional[bool] = None,
            regional_routing_on: Optional[bool] = None,
            users_approval_on: Optional[bool] = None,
            users_role_allowed_to_join_external_tailnet: Optional[str] = None) -> TailnetSettings
    func GetTailnetSettings(ctx *Context, name string, id IDInput, state *TailnetSettingsState, opts ...ResourceOption) (*TailnetSettings, error)
    public static TailnetSettings Get(string name, Input<string> id, TailnetSettingsState? state, CustomResourceOptions? opts = null)
    public static TailnetSettings get(String name, Output<String> id, TailnetSettingsState 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:
    DevicesApprovalOn bool
    Whether device approval is enabled for the tailnet
    DevicesAutoUpdatesOn bool
    Whether auto updates are enabled for devices that belong to this tailnet
    DevicesKeyDurationDays int
    The key expiry duration for devices on this tailnet
    NetworkFlowLoggingOn bool
    Whether network flog logs are enabled for the tailnet
    PostureIdentityCollectionOn bool
    Whether identity collection is enabled for device posture integrations for the tailnet
    RegionalRoutingOn bool
    Whether regional routing is enabled for the tailnet
    UsersApprovalOn bool
    Whether user approval is enabled for this tailnet
    UsersRoleAllowedToJoinExternalTailnet string
    Which user roles are allowed to join external tailnets
    DevicesApprovalOn bool
    Whether device approval is enabled for the tailnet
    DevicesAutoUpdatesOn bool
    Whether auto updates are enabled for devices that belong to this tailnet
    DevicesKeyDurationDays int
    The key expiry duration for devices on this tailnet
    NetworkFlowLoggingOn bool
    Whether network flog logs are enabled for the tailnet
    PostureIdentityCollectionOn bool
    Whether identity collection is enabled for device posture integrations for the tailnet
    RegionalRoutingOn bool
    Whether regional routing is enabled for the tailnet
    UsersApprovalOn bool
    Whether user approval is enabled for this tailnet
    UsersRoleAllowedToJoinExternalTailnet string
    Which user roles are allowed to join external tailnets
    devicesApprovalOn Boolean
    Whether device approval is enabled for the tailnet
    devicesAutoUpdatesOn Boolean
    Whether auto updates are enabled for devices that belong to this tailnet
    devicesKeyDurationDays Integer
    The key expiry duration for devices on this tailnet
    networkFlowLoggingOn Boolean
    Whether network flog logs are enabled for the tailnet
    postureIdentityCollectionOn Boolean
    Whether identity collection is enabled for device posture integrations for the tailnet
    regionalRoutingOn Boolean
    Whether regional routing is enabled for the tailnet
    usersApprovalOn Boolean
    Whether user approval is enabled for this tailnet
    usersRoleAllowedToJoinExternalTailnet String
    Which user roles are allowed to join external tailnets
    devicesApprovalOn boolean
    Whether device approval is enabled for the tailnet
    devicesAutoUpdatesOn boolean
    Whether auto updates are enabled for devices that belong to this tailnet
    devicesKeyDurationDays number
    The key expiry duration for devices on this tailnet
    networkFlowLoggingOn boolean
    Whether network flog logs are enabled for the tailnet
    postureIdentityCollectionOn boolean
    Whether identity collection is enabled for device posture integrations for the tailnet
    regionalRoutingOn boolean
    Whether regional routing is enabled for the tailnet
    usersApprovalOn boolean
    Whether user approval is enabled for this tailnet
    usersRoleAllowedToJoinExternalTailnet string
    Which user roles are allowed to join external tailnets
    devices_approval_on bool
    Whether device approval is enabled for the tailnet
    devices_auto_updates_on bool
    Whether auto updates are enabled for devices that belong to this tailnet
    devices_key_duration_days int
    The key expiry duration for devices on this tailnet
    network_flow_logging_on bool
    Whether network flog logs are enabled for the tailnet
    posture_identity_collection_on bool
    Whether identity collection is enabled for device posture integrations for the tailnet
    regional_routing_on bool
    Whether regional routing is enabled for the tailnet
    users_approval_on bool
    Whether user approval is enabled for this tailnet
    users_role_allowed_to_join_external_tailnet str
    Which user roles are allowed to join external tailnets
    devicesApprovalOn Boolean
    Whether device approval is enabled for the tailnet
    devicesAutoUpdatesOn Boolean
    Whether auto updates are enabled for devices that belong to this tailnet
    devicesKeyDurationDays Number
    The key expiry duration for devices on this tailnet
    networkFlowLoggingOn Boolean
    Whether network flog logs are enabled for the tailnet
    postureIdentityCollectionOn Boolean
    Whether identity collection is enabled for device posture integrations for the tailnet
    regionalRoutingOn Boolean
    Whether regional routing is enabled for the tailnet
    usersApprovalOn Boolean
    Whether user approval is enabled for this tailnet
    usersRoleAllowedToJoinExternalTailnet String
    Which user roles are allowed to join external tailnets

    Import

    ID doesn’t matter.

    $ pulumi import tailscale:index/tailnetSettings:TailnetSettings sample_preferences tailnet_settings
    

    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.17.1 published on Monday, Sep 23, 2024 by Pulumi