1. Packages
  2. Tailscale Provider
  3. API Docs
  4. getUsers
Tailscale v0.19.0 published on Thursday, Apr 10, 2025 by Pulumi

tailscale.getUsers

Explore with Pulumi AI

Tailscale v0.19.0 published on Thursday, Apr 10, 2025 by Pulumi

The users data source describes a list of users in a tailnet

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tailscale from "@pulumi/tailscale";

const all_users = tailscale.getUsers({});
Copy
import pulumi
import pulumi_tailscale as tailscale

all_users = tailscale.get_users()
Copy
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.GetUsers(ctx, &tailscale.GetUsersArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tailscale = Pulumi.Tailscale;

return await Deployment.RunAsync(() => 
{
    var all_users = Tailscale.GetUsers.Invoke();

});
Copy
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.GetUsersArgs;
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 all-users = TailscaleFunctions.getUsers(GetUsersArgs.builder()
            .build());

    }
}
Copy
variables:
  all-users:
    fn::invoke:
      function: tailscale:getUsers
      arguments: {}
Copy

Using getUsers

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 getUsers(args: GetUsersArgs, opts?: InvokeOptions): Promise<GetUsersResult>
function getUsersOutput(args: GetUsersOutputArgs, opts?: InvokeOptions): Output<GetUsersResult>
Copy
def get_users(role: Optional[str] = None,
              type: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetUsersResult
def get_users_output(role: Optional[pulumi.Input[str]] = None,
              type: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetUsersResult]
Copy
func GetUsers(ctx *Context, args *GetUsersArgs, opts ...InvokeOption) (*GetUsersResult, error)
func GetUsersOutput(ctx *Context, args *GetUsersOutputArgs, opts ...InvokeOption) GetUsersResultOutput
Copy

> Note: This function is named GetUsers in the Go SDK.

public static class GetUsers 
{
    public static Task<GetUsersResult> InvokeAsync(GetUsersArgs args, InvokeOptions? opts = null)
    public static Output<GetUsersResult> Invoke(GetUsersInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetUsersResult> getUsers(GetUsersArgs args, InvokeOptions options)
public static Output<GetUsersResult> getUsers(GetUsersArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tailscale:index/getUsers:getUsers
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Role string
Filters the users list to elements whose role is the provided value.
Type string
Filters the users list to elements whose type is the provided value.
Role string
Filters the users list to elements whose role is the provided value.
Type string
Filters the users list to elements whose type is the provided value.
role String
Filters the users list to elements whose role is the provided value.
type String
Filters the users list to elements whose type is the provided value.
role string
Filters the users list to elements whose role is the provided value.
type string
Filters the users list to elements whose type is the provided value.
role str
Filters the users list to elements whose role is the provided value.
type str
Filters the users list to elements whose type is the provided value.
role String
Filters the users list to elements whose role is the provided value.
type String
Filters the users list to elements whose type is the provided value.

getUsers Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Users List<GetUsersUser>
The list of users in the tailnet
Role string
Filters the users list to elements whose role is the provided value.
Type string
Filters the users list to elements whose type is the provided value.
Id string
The provider-assigned unique ID for this managed resource.
Users []GetUsersUser
The list of users in the tailnet
Role string
Filters the users list to elements whose role is the provided value.
Type string
Filters the users list to elements whose type is the provided value.
id String
The provider-assigned unique ID for this managed resource.
users List<GetUsersUser>
The list of users in the tailnet
role String
Filters the users list to elements whose role is the provided value.
type String
Filters the users list to elements whose type is the provided value.
id string
The provider-assigned unique ID for this managed resource.
users GetUsersUser[]
The list of users in the tailnet
role string
Filters the users list to elements whose role is the provided value.
type string
Filters the users list to elements whose type is the provided value.
id str
The provider-assigned unique ID for this managed resource.
users Sequence[GetUsersUser]
The list of users in the tailnet
role str
Filters the users list to elements whose role is the provided value.
type str
Filters the users list to elements whose type is the provided value.
id String
The provider-assigned unique ID for this managed resource.
users List<Property Map>
The list of users in the tailnet
role String
Filters the users list to elements whose role is the provided value.
type String
Filters the users list to elements whose type is the provided value.

Supporting Types

GetUsersUser

Created This property is required. string
The time the user joined their tailnet.
CurrentlyConnected This property is required. bool
true when the user has a node currently connected to the control server.
DeviceCount This property is required. int
Number of devices the user owns.
DisplayName This property is required. string
The name of the user.
Id This property is required. string
The unique identifier for the user.
LastSeen This property is required. string
The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
LoginName This property is required. string
The emailish login name of the user.
ProfilePicUrl This property is required. string
The profile pic URL for the user.
Role This property is required. string
The role of the user.
Status This property is required. string
The status of the user.
TailnetId This property is required. string
The tailnet that owns the user.
Type This property is required. string
The type of relation this user has to the tailnet associated with the request.
Created This property is required. string
The time the user joined their tailnet.
CurrentlyConnected This property is required. bool
true when the user has a node currently connected to the control server.
DeviceCount This property is required. int
Number of devices the user owns.
DisplayName This property is required. string
The name of the user.
Id This property is required. string
The unique identifier for the user.
LastSeen This property is required. string
The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
LoginName This property is required. string
The emailish login name of the user.
ProfilePicUrl This property is required. string
The profile pic URL for the user.
Role This property is required. string
The role of the user.
Status This property is required. string
The status of the user.
TailnetId This property is required. string
The tailnet that owns the user.
Type This property is required. string
The type of relation this user has to the tailnet associated with the request.
created This property is required. String
The time the user joined their tailnet.
currentlyConnected This property is required. Boolean
true when the user has a node currently connected to the control server.
deviceCount This property is required. Integer
Number of devices the user owns.
displayName This property is required. String
The name of the user.
id This property is required. String
The unique identifier for the user.
lastSeen This property is required. String
The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
loginName This property is required. String
The emailish login name of the user.
profilePicUrl This property is required. String
The profile pic URL for the user.
role This property is required. String
The role of the user.
status This property is required. String
The status of the user.
tailnetId This property is required. String
The tailnet that owns the user.
type This property is required. String
The type of relation this user has to the tailnet associated with the request.
created This property is required. string
The time the user joined their tailnet.
currentlyConnected This property is required. boolean
true when the user has a node currently connected to the control server.
deviceCount This property is required. number
Number of devices the user owns.
displayName This property is required. string
The name of the user.
id This property is required. string
The unique identifier for the user.
lastSeen This property is required. string
The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
loginName This property is required. string
The emailish login name of the user.
profilePicUrl This property is required. string
The profile pic URL for the user.
role This property is required. string
The role of the user.
status This property is required. string
The status of the user.
tailnetId This property is required. string
The tailnet that owns the user.
type This property is required. string
The type of relation this user has to the tailnet associated with the request.
created This property is required. str
The time the user joined their tailnet.
currently_connected This property is required. bool
true when the user has a node currently connected to the control server.
device_count This property is required. int
Number of devices the user owns.
display_name This property is required. str
The name of the user.
id This property is required. str
The unique identifier for the user.
last_seen This property is required. str
The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
login_name This property is required. str
The emailish login name of the user.
profile_pic_url This property is required. str
The profile pic URL for the user.
role This property is required. str
The role of the user.
status This property is required. str
The status of the user.
tailnet_id This property is required. str
The tailnet that owns the user.
type This property is required. str
The type of relation this user has to the tailnet associated with the request.
created This property is required. String
The time the user joined their tailnet.
currentlyConnected This property is required. Boolean
true when the user has a node currently connected to the control server.
deviceCount This property is required. Number
Number of devices the user owns.
displayName This property is required. String
The name of the user.
id This property is required. String
The unique identifier for the user.
lastSeen This property is required. String
The later of either: a) The last time any of the user's nodes were connected to the network or b) The last time the user authenticated to any tailscale service, including the admin panel.
loginName This property is required. String
The emailish login name of the user.
profilePicUrl This property is required. String
The profile pic URL for the user.
role This property is required. String
The role of the user.
status This property is required. String
The status of the user.
tailnetId This property is required. String
The tailnet that owns the user.
type This property is required. String
The type of relation this user has to the tailnet associated with the request.

Package Details

Repository
tailscale pulumi/pulumi-tailscale
License
Apache-2.0
Notes
This Pulumi package is based on the tailscale Terraform Provider.
Tailscale v0.19.0 published on Thursday, Apr 10, 2025 by Pulumi