--- layout: page title: proxmox_virtual_environment_user_token parent: Resources subcategory: Virtual Environment description: |- User API tokens. --- # Resource: proxmox_virtual_environment_user_token User API tokens. ## Example Usage ```terraform # 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 `!`. - `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: ```shell #!/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 ```