terraform-provider-proxmox icon indicating copy to clipboard operation
terraform-provider-proxmox copied to clipboard

User token

Open sergelogvinov opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

Create a user token.

Describe the solution you'd like

resource "proxmox_virtual_environment_user_token" "kubernetes" {
  # required params
  user_id = "prometheus@pve"
  token_id = "kubernetes"

  # optional
  acl {
    path      = "/"
    propagate = true
    role_id   = "PVEAuditor"
  }

  separate = false
  comment = "Prometheus token"
  expiration_date = "2035-12-31T23:59:59Z"
}

What do you think?

sergelogvinov avatar Mar 24 '24 07:03 sergelogvinov

Hi @sergelogvinov 👋🏼 I believe this is about the API Tokens
If so, there is a feature request already: #740, which I don't mind to close, and keep this one.

The resource model makes sense to me. I would rename the resource to proxmox_virtual_environment_api_token though. And I saw your WIP branch, having the "user token" naming there is fine.
Also, the separate attribute could be renamed to more explicit "privilege_separation" for more clarity.

Speaking about the implementation, I would like to have all new resource and datasources to be created using the Plugin Framework. My long term plan is to refactor all existing resources to the framework. You can find some example under /fwprovider folder.

Hope it make sense, pls let me know if you have any questions 🙂

bpg avatar Mar 25 '24 01:03 bpg

Implemented in

  • #1159

bpg avatar Jul 08 '24 17:07 bpg

Thank you!!! I'm already using it 👍

sergelogvinov avatar Jul 08 '24 17:07 sergelogvinov