Tailscale

Pulumi Official
Package maintained by Pulumi
v0.7.1 published on Monday, Apr 25, 2022 by Pulumi

getDevice

The device data source describes a single device in a tailnet.

Example Usage

using Pulumi;
using Tailscale = Pulumi.Tailscale;

class MyStack : Stack
{
    public MyStack()
    {
        var sampleDevice = Output.Create(Tailscale.GetDevice.InvokeAsync(new Tailscale.GetDeviceArgs
        {
            Name = "user1-device.example.com",
            WaitFor = "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, &GetDeviceArgs{
			Name:    "user1-device.example.com",
			WaitFor: pulumi.StringRef("60s"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_tailscale as tailscale

sample_device = tailscale.get_device(name="user1-device.example.com",
    wait_for="60s")
import * as pulumi from "@pulumi/pulumi";
import * as tailscale from "@pulumi/tailscale";

const sampleDevice = pulumi.output(tailscale.getDevice({
    name: "user1-device.example.com",
    waitFor: "60s",
}));

Coming soon!

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(name: Optional[str] = None,
               wait_for: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetDeviceResult
def get_device_output(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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: tailscale:index/getDevice:getDevice
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

The name of the tailnet device to obtain the attributes of.

WaitFor string

If specified, the provider will retry obtaining the device data every second until the specified duration has been reached. Must be a value greater than 1 second

Name string

The name of the tailnet device to obtain the attributes of.

WaitFor string

If specified, the provider will retry obtaining the device data every second until the specified duration has been reached. Must be a value greater than 1 second

name String

The name of the tailnet device to obtain the attributes of.

waitFor String

If specified, the provider will retry obtaining the device data every second until the specified duration has been reached. Must be a value greater than 1 second

name string

The name of the tailnet device to obtain the attributes of.

waitFor string

If specified, the provider will retry obtaining the device data every second until the specified duration has been reached. Must be a value greater than 1 second

name str

The name of the tailnet device to obtain the attributes of.

wait_for str

If specified, the provider will retry obtaining the device data every second until the specified duration has been reached. Must be a value greater than 1 second

name String

The name of the tailnet device to obtain the attributes of.

waitFor String

If specified, the provider will retry obtaining the device data every second until the specified duration has been reached. Must be a value greater than 1 second

getDevice Result

The following output properties are available:

Addresses List<string>

Tailscale IPs for the device

Id string

The provider-assigned unique ID for this managed resource.

Name string
Tags List<string>

Tags applied to the device

User string

The user associated with the device

WaitFor string
Addresses []string

Tailscale IPs for the device

Id string

The provider-assigned unique ID for this managed resource.

Name string
Tags []string

Tags applied to the device

User string

The user associated with the device

WaitFor string
addresses List

Tailscale IPs for the device

id String

The provider-assigned unique ID for this managed resource.

name String
tags List

Tags applied to the device

user String

The user associated with the device

waitFor String
addresses string[]

Tailscale IPs for the device

id string

The provider-assigned unique ID for this managed resource.

name string
tags string[]

Tags applied to the device

user string

The user associated with the device

waitFor string
addresses Sequence[str]

Tailscale IPs for the device

id str

The provider-assigned unique ID for this managed resource.

name str
tags Sequence[str]

Tags applied to the device

user str

The user associated with the device

wait_for str
addresses List

Tailscale IPs for the device

id String

The provider-assigned unique ID for this managed resource.

name String
tags List

Tags applied to the device

user String

The user associated with the device

waitFor String

Package Details

Repository
https://github.com/pulumi/pulumi-tailscale
License
Apache-2.0
Notes

This Pulumi package is based on the tailscale Terraform Provider.