0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-02 03: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:
Pavel Boldyrev 2023-12-04 21:37:36 -05:00 committed by GitHub
parent 6747dafac7
commit d1f2093d39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,6 +270,11 @@ func Container() *schema.Resource {
Description: "The description",
Optional: true,
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: {
Type: schema.TypeList,