0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-11 16:25:02 +00:00

fix(vm,lxc): Add validation for non-empty tags (#330)

This commit is contained in:
Pavel Boldyrev 2023-05-10 22:06:15 -04:00 committed by GitHub
parent 4be9914757
commit 8359c03aa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 8 deletions

View File

@ -608,7 +608,10 @@ func Container() *schema.Resource {
Type: schema.TypeList,
Description: "Tags of the container. This is only meta information.",
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringIsNotEmpty,
},
DiffSuppressFunc: suppressIfListsAreEqualIgnoringOrder,
DiffSuppressOnRefresh: true,
},

View File

@ -1120,7 +1120,10 @@ func VM() *schema.Resource {
Type: schema.TypeList,
Description: "Tags of the virtual machine. This is only meta information.",
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateFunc: validation.StringIsNotEmpty,
},
DiffSuppressFunc: suppressIfListsAreEqualIgnoringOrder,
DiffSuppressOnRefresh: true,
},