Files

2.0 KiB

page_title, subcategory, description
page_title subcategory description
netbird_user Resource - netbird Invite and Manage Users, see NetBird Docs https://docs.netbird.io/how-to/add-users-to-your-network for more information, existing users should be imported.

netbird_user (Resource)

Invite and Manage Users, see NetBird Docs for more information, existing users should be imported.

Example Usage

resource "netbird_group" "example" {
  name = "Test"
}

resource "netbird_user" "service_user" {
  is_service_user = true
  name            = "Test"
  auto_groups     = [netbird_group.example.id]
  is_blocked      = false
  role            = "admin"
}

resource "netbird_user" "real_user" {
  is_service_user = false
  name            = "John Doe"
  email           = "johndoe@company.co"
  auto_groups     = [netbird_group.example.id]
  is_blocked      = false
  role            = "admin"
}

Schema

Required

  • is_service_user (Boolean) If set to true, creates a Service Account User

Optional

  • auto_groups (List of String) Group IDs to auto-assign to peers registered by this user
  • email (String) User Email
  • is_blocked (Boolean) If set to true then user is blocked and can't use the system
  • name (String) User Name
  • role (String) User's NetBird account role (owner|admin|user|billing_admin|auditor|network_admin).

Read-Only

  • id (String) The unique identifier of a user
  • is_current (Boolean) Set to true if the caller user is the same as the resource user
  • issued (String) User issue method
  • last_login (String) User Last Login timedate
  • status (String) User status (active or invited)

Import

Import is supported using the following syntax:

terraform import netbird_user.example user_id

# For example

terraform import netbird_user.example 2fd8f4d6-d6c2-44c3-b7a4-adb644177b3d