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

Commit a903c77

Browse files
committed
BC hotfix for 3.2.1: supress diff when hardware_reservation_id is removed
Signed-off-by: Tomas Karasek <[email protected]>
1 parent dafb155 commit a903c77

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packet/resource_packet_device.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,13 @@ func resourcePacketDevice() *schema.Resource {
245245
Optional: true,
246246
ForceNew: true,
247247
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
248+
// backward compatibility for < 3.2.0:
249+
// removing hardware_reservation_id did not force recreation
250+
// (probably because of Computed:true, removed in 3.2.0)
251+
if new == "" {
252+
return true
253+
}
254+
248255
dhwr, ok := d.GetOk("deployed_hardware_reservation_id")
249256

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

0 commit comments

Comments
 (0)