mirror of
https://github.com/netbirdio/terraform-provider-netbird.git
synced 2026-05-22 17:13:16 -07:00
2.0 KiB
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 useremail(String) User Emailis_blocked(Boolean) If set to true then user is blocked and can't use the systemname(String) User Namerole(String) User's NetBird account role (owner|admin|user|billing_admin|auditor|network_admin).
Read-Only
id(String) The unique identifier of a useris_current(Boolean) Set to true if the caller user is the same as the resource userissued(String) User issue methodlast_login(String) User Last Login timedatestatus(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