mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-04 04:22:59 +00:00
fix(lxc): description is always showed as changed (#762)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
6747dafac7
commit
d1f2093d39
@ -270,6 +270,11 @@ func Container() *schema.Resource {
|
|||||||
Description: "The description",
|
Description: "The description",
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Default: dvResourceVirtualEnvironmentContainerDescription,
|
Default: dvResourceVirtualEnvironmentContainerDescription,
|
||||||
|
StateFunc: func(i interface{}) string {
|
||||||
|
// PVE always adds a newline to the description, so we have to do the same,
|
||||||
|
// also taking in account the CLRF case (Windows)
|
||||||
|
return strings.ReplaceAll(strings.TrimSpace(i.(string)), "\r\n", "\n") + "\n"
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mkResourceVirtualEnvironmentContainerDisk: {
|
mkResourceVirtualEnvironmentContainerDisk: {
|
||||||
Type: schema.TypeList,
|
Type: schema.TypeList,
|
||||||
|
Loading…
Reference in New Issue
Block a user