diff --git a/docs/resources/virtual_environment_user.md b/docs/resources/virtual_environment_user.md index e3e69428..3f3ba774 100644 --- a/docs/resources/virtual_environment_user.md +++ b/docs/resources/virtual_environment_user.md @@ -49,7 +49,7 @@ resource "proxmox_virtual_environment_role" "operations_monitoring" { - `groups` - (Optional) The user's groups. - `keys` - (Optional) The user's keys. - `last_name` - (Optional) The user's last name. -- `password` - (Required) The user's password. +- `password` - (Optional) The user's password. Required for PVE or PAM realms. - `user_id` - (Required) The user identifier. ## Attribute Reference diff --git a/proxmoxtf/resource/user.go b/proxmoxtf/resource/user.go index 50e45d70..a8f00f62 100644 --- a/proxmoxtf/resource/user.go +++ b/proxmoxtf/resource/user.go @@ -131,7 +131,7 @@ func User() *schema.Resource { mkResourceVirtualEnvironmentUserPassword: { Type: schema.TypeString, Description: "The user's password", - Required: true, + Optional: true, }, mkResourceVirtualEnvironmentUserUserID: { Type: schema.TypeString, diff --git a/proxmoxtf/resource/user_test.go b/proxmoxtf/resource/user_test.go index f570d889..d5122fd9 100644 --- a/proxmoxtf/resource/user_test.go +++ b/proxmoxtf/resource/user_test.go @@ -31,7 +31,6 @@ func TestUserSchema(t *testing.T) { s := User() test.AssertRequiredArguments(t, s, []string{ - mkResourceVirtualEnvironmentUserPassword, mkResourceVirtualEnvironmentUserUserID, }) @@ -45,6 +44,7 @@ func TestUserSchema(t *testing.T) { mkResourceVirtualEnvironmentUserGroups, mkResourceVirtualEnvironmentUserKeys, mkResourceVirtualEnvironmentUserLastName, + mkResourceVirtualEnvironmentUserPassword, }) test.AssertValueTypes(t, s, map[string]schema.ValueType{