mirror of
https://github.com/netbirdio/terraform-provider-netbird.git
synced 2026-05-22 17:13:16 -07:00
2.2 KiB
2.2 KiB
page_title, subcategory, description
| page_title | subcategory | description |
|---|---|---|
| netbird_setup_key Resource - netbird | Create and Manage Setup Keys, see NetBird Docs https://docs.netbird.io/how-to/register-machines-using-setup-keys for more information. |
netbird_setup_key (Resource)
Create and Manage Setup Keys, see NetBird Docs for more information.
Example Usage
resource "netbird_group" "example" {
name = "Test"
}
resource "netbird_setup_key" "example" {
name = "TF Test"
expiry_seconds = 86400
type = "reusable"
allow_extra_dns_labels = true
auto_groups = [netbird_group.example.id]
ephemeral = false
revoked = false
usage_limit = 0
}
Schema
Required
name(String) SetupKey Name
Optional
allow_extra_dns_labels(Boolean) Allow extra DNS labels to be added to the peerauto_groups(List of String) List of groups to automatically assign to peers created through this setup keyephemeral(Boolean) Indicate that the peer will be ephemeral or not, ephemeral peers are deleted after 10 minutes of inactivityexpiry_seconds(Number) Expiry time in seconds (0 is unlimited)revoked(Boolean) Set to true to revoke setup keytype(String) Setup Key type (one-off or reusable)usage_limit(Number) Maximum number of times SetupKey can be used (0 for unlimited)
Read-Only
expires(String) SetupKey Expiration Dateid(String) SetupKey IDkey(String, Sensitive) Plaintext setup keylast_used(String) Last usage timestate(String) Setup key state (valid or expired)updated_at(String) Creation timestampused_times(Number) Number of times Setup Key was usedvalid(Boolean) True if setup key can be used to create more Peers
Import
Import is supported using the following syntax:
terraform import netbird_setup_key.example setup_key_id
# For example
terraform import netbird_setup_key.example cvr9ibrl0ubs73c11gr0