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:
parent
4be9914757
commit
8359c03aa8
@ -605,10 +605,13 @@ func Container() *schema.Resource {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mkResourceVirtualEnvironmentContainerTags: {
|
mkResourceVirtualEnvironmentContainerTags: {
|
||||||
Type: schema.TypeList,
|
Type: schema.TypeList,
|
||||||
Description: "Tags of the container. This is only meta information.",
|
Description: "Tags of the container. This is only meta information.",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Elem: &schema.Schema{Type: schema.TypeString},
|
Elem: &schema.Schema{
|
||||||
|
Type: schema.TypeString,
|
||||||
|
ValidateFunc: validation.StringIsNotEmpty,
|
||||||
|
},
|
||||||
DiffSuppressFunc: suppressIfListsAreEqualIgnoringOrder,
|
DiffSuppressFunc: suppressIfListsAreEqualIgnoringOrder,
|
||||||
DiffSuppressOnRefresh: true,
|
DiffSuppressOnRefresh: true,
|
||||||
},
|
},
|
||||||
|
@ -1117,10 +1117,13 @@ func VM() *schema.Resource {
|
|||||||
Default: dvResourceVirtualEnvironmentVMTabletDevice,
|
Default: dvResourceVirtualEnvironmentVMTabletDevice,
|
||||||
},
|
},
|
||||||
mkResourceVirtualEnvironmentVMTags: {
|
mkResourceVirtualEnvironmentVMTags: {
|
||||||
Type: schema.TypeList,
|
Type: schema.TypeList,
|
||||||
Description: "Tags of the virtual machine. This is only meta information.",
|
Description: "Tags of the virtual machine. This is only meta information.",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Elem: &schema.Schema{Type: schema.TypeString},
|
Elem: &schema.Schema{
|
||||||
|
Type: schema.TypeString,
|
||||||
|
ValidateFunc: validation.StringIsNotEmpty,
|
||||||
|
},
|
||||||
DiffSuppressFunc: suppressIfListsAreEqualIgnoringOrder,
|
DiffSuppressFunc: suppressIfListsAreEqualIgnoringOrder,
|
||||||
DiffSuppressOnRefresh: true,
|
DiffSuppressOnRefresh: true,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user