tailscale.TailnetSettings
Explore with Pulumi AI
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TailnetSettings resource accepts the following input properties:
- Devices
Approval boolOn - Whether device approval is enabled for the tailnet
- Devices
Auto boolUpdates On - Whether auto updates are enabled for devices that belong to this tailnet
- Devices
Key intDuration Days - The key expiry duration for devices on this tailnet
- Network
Flow boolLogging On - Whether network flog logs are enabled for the tailnet
- Posture
Identity boolCollection On - Whether identity collection is enabled for device posture integrations for the tailnet
- Regional
Routing boolOn - Whether regional routing is enabled for the tailnet
- Users
Approval boolOn - Whether user approval is enabled for this tailnet
- Users
Role stringAllowed To Join External Tailnet - Which user roles are allowed to join external tailnets
- Devices
Approval boolOn - Whether device approval is enabled for the tailnet
- Devices
Auto boolUpdates On - Whether auto updates are enabled for devices that belong to this tailnet
- Devices
Key intDuration Days - The key expiry duration for devices on this tailnet
- Network
Flow boolLogging On - Whether network flog logs are enabled for the tailnet
- Posture
Identity boolCollection On - Whether identity collection is enabled for device posture integrations for the tailnet
- Regional
Routing boolOn - Whether regional routing is enabled for the tailnet
- Users
Approval boolOn - Whether user approval is enabled for this tailnet
- Users
Role stringAllowed To Join External Tailnet - Which user roles are allowed to join external tailnets
- devices
Approval BooleanOn - Whether device approval is enabled for the tailnet
- devices
Auto BooleanUpdates On - Whether auto updates are enabled for devices that belong to this tailnet
- devices
Key IntegerDuration Days - The key expiry duration for devices on this tailnet
- network
Flow BooleanLogging On - Whether network flog logs are enabled for the tailnet
- posture
Identity BooleanCollection On - Whether identity collection is enabled for device posture integrations for the tailnet
- regional
Routing BooleanOn - Whether regional routing is enabled for the tailnet
- users
Approval BooleanOn - Whether user approval is enabled for this tailnet
- users
Role StringAllowed To Join External Tailnet - Which user roles are allowed to join external tailnets
- devices
Approval booleanOn - Whether device approval is enabled for the tailnet
- devices
Auto booleanUpdates On - Whether auto updates are enabled for devices that belong to this tailnet
- devices
Key numberDuration Days - The key expiry duration for devices on this tailnet
- network
Flow booleanLogging On - Whether network flog logs are enabled for the tailnet
- posture
Identity booleanCollection On - Whether identity collection is enabled for device posture integrations for the tailnet
- regional
Routing booleanOn - Whether regional routing is enabled for the tailnet
- users
Approval booleanOn - Whether user approval is enabled for this tailnet
- users
Role stringAllowed To Join External Tailnet - Which user roles are allowed to join external tailnets
- devices_
approval_ boolon - Whether device approval is enabled for the tailnet
- devices_
auto_ boolupdates_ on - Whether auto updates are enabled for devices that belong to this tailnet
- devices_
key_ intduration_ days - The key expiry duration for devices on this tailnet
- network_
flow_ boollogging_ on - Whether network flog logs are enabled for the tailnet
- posture_
identity_ boolcollection_ on - Whether identity collection is enabled for device posture integrations for the tailnet
- regional_
routing_ boolon - Whether regional routing is enabled for the tailnet
- users_
approval_ boolon - Whether user approval is enabled for this tailnet
- users_
role_ strallowed_ to_ join_ external_ tailnet - Which user roles are allowed to join external tailnets
- devices
Approval BooleanOn - Whether device approval is enabled for the tailnet
- devices
Auto BooleanUpdates On - Whether auto updates are enabled for devices that belong to this tailnet
- devices
Key NumberDuration Days - The key expiry duration for devices on this tailnet
- network
Flow BooleanLogging On - Whether network flog logs are enabled for the tailnet
- posture
Identity BooleanCollection On - Whether identity collection is enabled for device posture integrations for the tailnet
- regional
Routing BooleanOn - Whether regional routing is enabled for the tailnet
- users
Approval BooleanOn - Whether user approval is enabled for this tailnet
- users
Role StringAllowed To Join External Tailnet - 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.
- Devices
Approval boolOn - Whether device approval is enabled for the tailnet
- Devices
Auto boolUpdates On - Whether auto updates are enabled for devices that belong to this tailnet
- Devices
Key intDuration Days - The key expiry duration for devices on this tailnet
- Network
Flow boolLogging On - Whether network flog logs are enabled for the tailnet
- Posture
Identity boolCollection On - Whether identity collection is enabled for device posture integrations for the tailnet
- Regional
Routing boolOn - Whether regional routing is enabled for the tailnet
- Users
Approval boolOn - Whether user approval is enabled for this tailnet
- Users
Role stringAllowed To Join External Tailnet - Which user roles are allowed to join external tailnets
- Devices
Approval boolOn - Whether device approval is enabled for the tailnet
- Devices
Auto boolUpdates On - Whether auto updates are enabled for devices that belong to this tailnet
- Devices
Key intDuration Days - The key expiry duration for devices on this tailnet
- Network
Flow boolLogging On - Whether network flog logs are enabled for the tailnet
- Posture
Identity boolCollection On - Whether identity collection is enabled for device posture integrations for the tailnet
- Regional
Routing boolOn - Whether regional routing is enabled for the tailnet
- Users
Approval boolOn - Whether user approval is enabled for this tailnet
- Users
Role stringAllowed To Join External Tailnet - Which user roles are allowed to join external tailnets
- devices
Approval BooleanOn - Whether device approval is enabled for the tailnet
- devices
Auto BooleanUpdates On - Whether auto updates are enabled for devices that belong to this tailnet
- devices
Key IntegerDuration Days - The key expiry duration for devices on this tailnet
- network
Flow BooleanLogging On - Whether network flog logs are enabled for the tailnet
- posture
Identity BooleanCollection On - Whether identity collection is enabled for device posture integrations for the tailnet
- regional
Routing BooleanOn - Whether regional routing is enabled for the tailnet
- users
Approval BooleanOn - Whether user approval is enabled for this tailnet
- users
Role StringAllowed To Join External Tailnet - Which user roles are allowed to join external tailnets
- devices
Approval booleanOn - Whether device approval is enabled for the tailnet
- devices
Auto booleanUpdates On - Whether auto updates are enabled for devices that belong to this tailnet
- devices
Key numberDuration Days - The key expiry duration for devices on this tailnet
- network
Flow booleanLogging On - Whether network flog logs are enabled for the tailnet
- posture
Identity booleanCollection On - Whether identity collection is enabled for device posture integrations for the tailnet
- regional
Routing booleanOn - Whether regional routing is enabled for the tailnet
- users
Approval booleanOn - Whether user approval is enabled for this tailnet
- users
Role stringAllowed To Join External Tailnet - Which user roles are allowed to join external tailnets
- devices_
approval_ boolon - Whether device approval is enabled for the tailnet
- devices_
auto_ boolupdates_ on - Whether auto updates are enabled for devices that belong to this tailnet
- devices_
key_ intduration_ days - The key expiry duration for devices on this tailnet
- network_
flow_ boollogging_ on - Whether network flog logs are enabled for the tailnet
- posture_
identity_ boolcollection_ on - Whether identity collection is enabled for device posture integrations for the tailnet
- regional_
routing_ boolon - Whether regional routing is enabled for the tailnet
- users_
approval_ boolon - Whether user approval is enabled for this tailnet
- users_
role_ strallowed_ to_ join_ external_ tailnet - Which user roles are allowed to join external tailnets
- devices
Approval BooleanOn - Whether device approval is enabled for the tailnet
- devices
Auto BooleanUpdates On - Whether auto updates are enabled for devices that belong to this tailnet
- devices
Key NumberDuration Days - The key expiry duration for devices on this tailnet
- network
Flow BooleanLogging On - Whether network flog logs are enabled for the tailnet
- posture
Identity BooleanCollection On - Whether identity collection is enabled for device posture integrations for the tailnet
- regional
Routing BooleanOn - Whether regional routing is enabled for the tailnet
- users
Approval BooleanOn - Whether user approval is enabled for this tailnet
- users
Role StringAllowed To Join External Tailnet - 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.