Skip to content

Commit

Permalink
fix: enable new versions of providers to run on old tfstate files #702 (
Browse files Browse the repository at this point in the history
#923)

* fix: enable new versions of providers to run on old tfstate files #702

* feat: re-applying patch to restore backward compatibility with tfstate files

---------

Co-authored-by: hestia <hestia@hax0rbana.org>
  • Loading branch information
hestiahacker and hestia committed Feb 21, 2024
1 parent 47ac25d commit 60d1a3b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions proxmox/resource_vm_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -3119,6 +3119,12 @@ func schema_DiskBackup() *schema.Schema {
Type: schema.TypeBool,
Optional: true,
Default: true,
// Convert previous integer values of 0/1 to booleans
StateFunc: func(val interface{}) string {
if val.(string) == "0" {return "false"}
if val.(string) == "1" {return "true"}
return val.(string)
},
}
}

Expand Down

0 comments on commit 60d1a3b

Please sign in to comment.