0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-08-23 03:48:35 +00:00

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>
This commit is contained in:
Moustafa Baiou 2023-08-10 11:07:49 -04:00 committed by GitHub
parent f901e711dd
commit 244e061779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,11 @@ resource "proxmox_virtual_environment_user" "example" {
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
}

View File

@ -27,7 +27,7 @@ type UserCreateRequestBody struct {
ID string `json:"userid" url:"userid"`
Keys *string `json:"keys,omitempty" url:"keys,omitempty"`
LastName *string `json:"lastname,omitempty" url:"lastname,omitempty"`
Password string `json:"password" url:"password"`
Password string `json:"password" url:"password,omitempty"`
}
// UserGetResponseBody contains the body from a user get response.