Skip to content

Commit 45698f4

Browse files
committed
server remove DiffSuppressFunc offer
1 parent a9d2a7f commit 45698f4

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

internal/services/baremetal/server.go

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,10 @@ func ResourceServer() *schema.Resource {
5454
Description: "Hostname of the server",
5555
},
5656
"offer": {
57-
Type: schema.TypeString,
58-
Required: true,
59-
ForceNew: true,
60-
Description: "ID or name of the server offer",
61-
DiffSuppressFunc: func(_, oldValue, newValue string, d *schema.ResourceData) bool {
62-
// remove the locality from the IDs when checking diff
63-
if locality.ExpandID(newValue) == locality.ExpandID(oldValue) {
64-
return true
65-
}
66-
// if the offer was provided by name
67-
offerName, ok := d.GetOk("offer_name")
68-
69-
return ok && newValue == offerName
70-
},
57+
Type: schema.TypeString,
58+
Required: true,
59+
ForceNew: true,
60+
Description: "ID or name of the server offer",
7161
ValidateDiagFunc: verify.IsUUIDOrNameOffer(),
7262
},
7363
"offer_id": {

0 commit comments

Comments
 (0)