Viewing docs for Tailscale v0.27.0
published on Friday, Feb 20, 2026 by Pulumi
published on Friday, Feb 20, 2026 by Pulumi
Viewing docs for Tailscale v0.27.0
published on Friday, Feb 20, 2026 by Pulumi
published on Friday, Feb 20, 2026 by Pulumi
The device data source describes a single device in a tailnet
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tailscale from "@pulumi/tailscale";
const sampleDevice = tailscale.getDevice({
name: "device1.example.ts.net",
waitFor: "60s",
});
const sampleDevice2 = tailscale.getDevice({
hostname: "device2",
waitFor: "60s",
});
import pulumi
import pulumi_tailscale as tailscale
sample_device = tailscale.get_device(name="device1.example.ts.net",
wait_for="60s")
sample_device2 = tailscale.get_device(hostname="device2",
wait_for="60s")
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.GetDevice(ctx, &tailscale.GetDeviceArgs{
Name: pulumi.StringRef("device1.example.ts.net"),
WaitFor: pulumi.StringRef("60s"),
}, nil)
if err != nil {
return err
}
_, err = tailscale.GetDevice(ctx, &tailscale.GetDeviceArgs{
Hostname: pulumi.StringRef("device2"),
WaitFor: pulumi.StringRef("60s"),
}, nil)
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 sampleDevice = Tailscale.GetDevice.Invoke(new()
{
Name = "device1.example.ts.net",
WaitFor = "60s",
});
var sampleDevice2 = Tailscale.GetDevice.Invoke(new()
{
Hostname = "device2",
WaitFor = "60s",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tailscale.TailscaleFunctions;
import com.pulumi.tailscale.inputs.GetDeviceArgs;
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) {
final var sampleDevice = TailscaleFunctions.getDevice(GetDeviceArgs.builder()
.name("device1.example.ts.net")
.waitFor("60s")
.build());
final var sampleDevice2 = TailscaleFunctions.getDevice(GetDeviceArgs.builder()
.hostname("device2")
.waitFor("60s")
.build());
}
}
variables:
sampleDevice:
fn::invoke:
function: tailscale:getDevice
arguments:
name: device1.example.ts.net
waitFor: 60s
sampleDevice2:
fn::invoke:
function: tailscale:getDevice
arguments:
hostname: device2
waitFor: 60s
Using getDevice
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDevice(args: GetDeviceArgs, opts?: InvokeOptions): Promise<GetDeviceResult>
function getDeviceOutput(args: GetDeviceOutputArgs, opts?: InvokeOptions): Output<GetDeviceResult>def get_device(hostname: Optional[str] = None,
name: Optional[str] = None,
wait_for: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDeviceResult
def get_device_output(hostname: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
wait_for: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDeviceResult]func GetDevice(ctx *Context, args *GetDeviceArgs, opts ...InvokeOption) (*GetDeviceResult, error)
func GetDeviceOutput(ctx *Context, args *GetDeviceOutputArgs, opts ...InvokeOption) GetDeviceResultOutput> Note: This function is named GetDevice in the Go SDK.
public static class GetDevice
{
public static Task<GetDeviceResult> InvokeAsync(GetDeviceArgs args, InvokeOptions? opts = null)
public static Output<GetDeviceResult> Invoke(GetDeviceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDeviceResult> getDevice(GetDeviceArgs args, InvokeOptions options)
public static Output<GetDeviceResult> getDevice(GetDeviceArgs args, InvokeOptions options)
fn::invoke:
function: tailscale:index/getDevice:getDevice
arguments:
# arguments dictionaryThe following arguments are supported:
- Hostname string
- The short hostname of the device
- Name string
- The full name of the device (e.g.
hostname.domain.ts.net) - Wait
For string - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
- Hostname string
- The short hostname of the device
- Name string
- The full name of the device (e.g.
hostname.domain.ts.net) - Wait
For string - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
- hostname String
- The short hostname of the device
- name String
- The full name of the device (e.g.
hostname.domain.ts.net) - wait
For String - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
- hostname string
- The short hostname of the device
- name string
- The full name of the device (e.g.
hostname.domain.ts.net) - wait
For string - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
- hostname str
- The short hostname of the device
- name str
- The full name of the device (e.g.
hostname.domain.ts.net) - wait_
for str - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
- hostname String
- The short hostname of the device
- name String
- The full name of the device (e.g.
hostname.domain.ts.net) - wait
For String - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
getDevice Result
The following output properties are available:
- Addresses List<string>
- The list of device's IPs
- bool
- Whether the device is authorized to access the tailnet
- Blocks
Incoming boolConnections - Whether the device blocks incoming connections
- Client
Version string - The Tailscale client version running on the device
- Created string
- The creation time of the device
- Expires string
- The expiry time of the device's key
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
External bool - Whether the device is marked as external
- Key
Expiry boolDisabled - Whether the device's key expiry is disabled
- Last
Seen string - The last seen time of the device
- Machine
Key string - The machine key of the device
- Node
Id string - The preferred indentifier for a device.
- Node
Key string - The node key of the device
- Os string
- The operating system of the device
- List<string>
- The tags applied to the device
- Tailnet
Lock stringError - The tailnet lock error for the device, if any
- Tailnet
Lock stringKey - The tailnet lock key for the device, if any
- Update
Available bool - Whether an update is available for the device
- User string
- The user associated with the device
- Hostname string
- The short hostname of the device
- Name string
- The full name of the device (e.g.
hostname.domain.ts.net) - Wait
For string - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
- Addresses []string
- The list of device's IPs
- bool
- Whether the device is authorized to access the tailnet
- Blocks
Incoming boolConnections - Whether the device blocks incoming connections
- Client
Version string - The Tailscale client version running on the device
- Created string
- The creation time of the device
- Expires string
- The expiry time of the device's key
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
External bool - Whether the device is marked as external
- Key
Expiry boolDisabled - Whether the device's key expiry is disabled
- Last
Seen string - The last seen time of the device
- Machine
Key string - The machine key of the device
- Node
Id string - The preferred indentifier for a device.
- Node
Key string - The node key of the device
- Os string
- The operating system of the device
- []string
- The tags applied to the device
- Tailnet
Lock stringError - The tailnet lock error for the device, if any
- Tailnet
Lock stringKey - The tailnet lock key for the device, if any
- Update
Available bool - Whether an update is available for the device
- User string
- The user associated with the device
- Hostname string
- The short hostname of the device
- Name string
- The full name of the device (e.g.
hostname.domain.ts.net) - Wait
For string - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
- addresses List<String>
- The list of device's IPs
- Boolean
- Whether the device is authorized to access the tailnet
- blocks
Incoming BooleanConnections - Whether the device blocks incoming connections
- client
Version String - The Tailscale client version running on the device
- created String
- The creation time of the device
- expires String
- The expiry time of the device's key
- id String
- The provider-assigned unique ID for this managed resource.
- is
External Boolean - Whether the device is marked as external
- key
Expiry BooleanDisabled - Whether the device's key expiry is disabled
- last
Seen String - The last seen time of the device
- machine
Key String - The machine key of the device
- node
Id String - The preferred indentifier for a device.
- node
Key String - The node key of the device
- os String
- The operating system of the device
- List<String>
- The tags applied to the device
- tailnet
Lock StringError - The tailnet lock error for the device, if any
- tailnet
Lock StringKey - The tailnet lock key for the device, if any
- update
Available Boolean - Whether an update is available for the device
- user String
- The user associated with the device
- hostname String
- The short hostname of the device
- name String
- The full name of the device (e.g.
hostname.domain.ts.net) - wait
For String - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
- addresses string[]
- The list of device's IPs
- boolean
- Whether the device is authorized to access the tailnet
- blocks
Incoming booleanConnections - Whether the device blocks incoming connections
- client
Version string - The Tailscale client version running on the device
- created string
- The creation time of the device
- expires string
- The expiry time of the device's key
- id string
- The provider-assigned unique ID for this managed resource.
- is
External boolean - Whether the device is marked as external
- key
Expiry booleanDisabled - Whether the device's key expiry is disabled
- last
Seen string - The last seen time of the device
- machine
Key string - The machine key of the device
- node
Id string - The preferred indentifier for a device.
- node
Key string - The node key of the device
- os string
- The operating system of the device
- string[]
- The tags applied to the device
- tailnet
Lock stringError - The tailnet lock error for the device, if any
- tailnet
Lock stringKey - The tailnet lock key for the device, if any
- update
Available boolean - Whether an update is available for the device
- user string
- The user associated with the device
- hostname string
- The short hostname of the device
- name string
- The full name of the device (e.g.
hostname.domain.ts.net) - wait
For string - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
- addresses Sequence[str]
- The list of device's IPs
- bool
- Whether the device is authorized to access the tailnet
- blocks_
incoming_ boolconnections - Whether the device blocks incoming connections
- client_
version str - The Tailscale client version running on the device
- created str
- The creation time of the device
- expires str
- The expiry time of the device's key
- id str
- The provider-assigned unique ID for this managed resource.
- is_
external bool - Whether the device is marked as external
- key_
expiry_ booldisabled - Whether the device's key expiry is disabled
- last_
seen str - The last seen time of the device
- machine_
key str - The machine key of the device
- node_
id str - The preferred indentifier for a device.
- node_
key str - The node key of the device
- os str
- The operating system of the device
- Sequence[str]
- The tags applied to the device
- tailnet_
lock_ strerror - The tailnet lock error for the device, if any
- tailnet_
lock_ strkey - The tailnet lock key for the device, if any
- update_
available bool - Whether an update is available for the device
- user str
- The user associated with the device
- hostname str
- The short hostname of the device
- name str
- The full name of the device (e.g.
hostname.domain.ts.net) - wait_
for str - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
- addresses List<String>
- The list of device's IPs
- Boolean
- Whether the device is authorized to access the tailnet
- blocks
Incoming BooleanConnections - Whether the device blocks incoming connections
- client
Version String - The Tailscale client version running on the device
- created String
- The creation time of the device
- expires String
- The expiry time of the device's key
- id String
- The provider-assigned unique ID for this managed resource.
- is
External Boolean - Whether the device is marked as external
- key
Expiry BooleanDisabled - Whether the device's key expiry is disabled
- last
Seen String - The last seen time of the device
- machine
Key String - The machine key of the device
- node
Id String - The preferred indentifier for a device.
- node
Key String - The node key of the device
- os String
- The operating system of the device
- List<String>
- The tags applied to the device
- tailnet
Lock StringError - The tailnet lock error for the device, if any
- tailnet
Lock StringKey - The tailnet lock key for the device, if any
- update
Available Boolean - Whether an update is available for the device
- user String
- The user associated with the device
- hostname String
- The short hostname of the device
- name String
- The full name of the device (e.g.
hostname.domain.ts.net) - wait
For String - If specified, the provider will make multiple attempts to obtain the data source until the wait_for duration is reached. Retries are made every second so this value should be greater than 1s
Package Details
- Repository
- tailscale pulumi/pulumi-tailscale
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
tailscaleTerraform Provider.
Viewing docs for Tailscale v0.27.0
published on Friday, Feb 20, 2026 by Pulumi
published on Friday, Feb 20, 2026 by Pulumi
