Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
BC hotfix for 3.2.1: supress diff when hardware_reservation_id is rem…
Browse files Browse the repository at this point in the history
…oved

Signed-off-by: Tomas Karasek <[email protected]>
  • Loading branch information
t0mk committed Dec 10, 2020
1 parent dafb155 commit a903c77
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packet/resource_packet_device.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@ func resourcePacketDevice() *schema.Resource {
Optional: true,
ForceNew: true,
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
// backward compatibility for < 3.2.0:
// removing hardware_reservation_id did not force recreation
// (probably because of Computed:true, removed in 3.2.0)
if new == "" {
return true
}

dhwr, ok := d.GetOk("deployed_hardware_reservation_id")

// ignore changes to "next-available" when the state matches
Expand Down

0 comments on commit a903c77

Please sign in to comment.