0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-30 18:42:58 +00:00
terraform-provider-proxmox/example/resource_virtual_environment_user.tf
Moustafa Baiou 244e061779
fix(user): make password attribute optional (#474)
* fix(user): make password attribute optional

The password is already optional in the terraform schema, but still serialized and sent as an empty string via the client. This addresses the request body serialization.

Addresses #462

* add example template

---------

Co-authored-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
2023-08-10 15:07:49 +00:00

62 lines
1.9 KiB
HCL

resource "proxmox_virtual_environment_user" "example" {
acl {
path = "/vms/${proxmox_virtual_environment_vm.example.id}"
propagate = true
role_id = "PVEVMAdmin"
}
comment = "Managed by Terraform"
password = "Test1234!"
user_id = "terraform-provider-proxmox-example@pve"
}
resource "proxmox_virtual_environment_user" "example2" {
comment = "Managed by Terraform"
user_id = "terraform-provider-proxmox-example2@pve"
}
output "resource_proxmox_virtual_environment_user_example_acl" {
value = proxmox_virtual_environment_user.example.acl
}
output "resource_proxmox_virtual_environment_user_example_comment" {
value = proxmox_virtual_environment_user.example.comment
}
output "resource_proxmox_virtual_environment_user_example_email" {
value = proxmox_virtual_environment_user.example.email
}
output "resource_proxmox_virtual_environment_user_example_enabled" {
value = proxmox_virtual_environment_user.example.enabled
}
output "resource_proxmox_virtual_environment_user_example_expiration_date" {
value = proxmox_virtual_environment_user.example.expiration_date
}
output "resource_proxmox_virtual_environment_user_example_first_name" {
value = proxmox_virtual_environment_user.example.first_name
}
output "resource_proxmox_virtual_environment_user_example_groups" {
value = proxmox_virtual_environment_user.example.groups
}
output "resource_proxmox_virtual_environment_user_example_keys" {
value = proxmox_virtual_environment_user.example.keys
}
output "resource_proxmox_virtual_environment_user_example_last_name" {
value = proxmox_virtual_environment_user.example.last_name
}
output "resource_proxmox_virtual_environment_user_example_password" {
value = proxmox_virtual_environment_user.example.password
sensitive = true
}
output "resource_proxmox_virtual_environment_user_example_user_id" {
value = proxmox_virtual_environment_user.example.id
}