Files

1.5 KiB

page_title, subcategory, description
page_title subcategory description
netbird_token Resource - netbird Create and Manage Personal Access Tokens, see NetBird Docs https://docs.netbird.io/how-to/access-netbird-public-api#creating-an-access-token for more information. Personal Access Tokens can only be created for current user if the current user is a Service User.

netbird_token (Resource)

Create and Manage Personal Access Tokens, see NetBird Docs for more information.

Personal Access Tokens can only be created for current user if the current user is a Service User.

Example Usage

data "netbird_user" "example" {
  self = true
}

resource "netbird_token" "example" {
  user_id         = data.netbird_user.example.id
  name            = "TF Test"
  expiration_days = 1
}

Schema

Required

  • expiration_days (Number)
  • name (String) Token Name
  • user_id (String) User ID

Read-Only

  • created_at (String) Creation timestamp
  • expiration_date (String) Token Expiration Date
  • id (String) Token ID
  • last_used (String) Last usage time
  • token (String, Sensitive) Plaintext token

Import

Import is supported using the following syntax:

terraform import netbird_token.example user_id/token_id

# For example

terraform import netbird_token.example 2fd8f4d6-d6c2-44c3-b7a4-adb644177b3d/cvi55i3l0ubs73asjud0