mirror of
https://github.com/netbirdio/terraform-provider-netbird.git
synced 2026-05-22 17:13:16 -07:00
1.5 KiB
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 Nameuser_id(String) User ID
Read-Only
created_at(String) Creation timestampexpiration_date(String) Token Expiration Dateid(String) Token IDlast_used(String) Last usage timetoken(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