mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 10:33:46 +00:00
1.7 KiB
1.7 KiB
layout | title | parent | subcategory | description |
---|---|---|---|---|
page | proxmox_virtual_environment_user_token | Resources | Virtual Environment | User API tokens. |
Resource: proxmox_virtual_environment_user_token
User API tokens.
Example Usage
# if creating a user token, the user must be created first
resource "proxmox_virtual_environment_user" "user" {
comment = "Managed by Terraform"
email = "user@pve"
enabled = true
expiration_date = "2034-01-01T22:00:00Z"
user_id = "user@pve"
}
resource "proxmox_virtual_environment_user_token" "user_token" {
comment = "Managed by Terraform"
expiration_date = "2033-01-01T22:00:00Z"
token_name = "tk1"
user_id = proxmox_virtual_environment_user.user.user_id
}
Schema
Required
token_name
(String) User-specific token identifier.user_id
(String) User identifier.
Optional
comment
(String) Comment for the token.expiration_date
(String) Expiration date for the token.privileges_separation
(Boolean) Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.
Read-Only
id
(String) Unique token identifier with format<user_id>!<token_name>
.value
(String, Sensitive) API token value used for authentication. It is populated only when creating a new token, and can't be retrieved at import.
Import
Import is supported using the following syntax:
#!/usr/bin/env sh
#Tokens can be imported using they identifiers in format `user_id!token_name` format, e.g.:
terraform import proxmox_virtual_environment_user_token.token1 user@pve!token1