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

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

View File

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