Skip to content

Commit 10b92a3

Browse files
tmp
1 parent 3cd1098 commit 10b92a3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

internal/provider/resource_catalystcenter_fabric_ewlc.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ func (r *FabricEWLCResource) Update(ctx context.Context, req resource.UpdateRequ
214214

215215
// End of section. //template:end update
216216

217-
// Section below is generated&owned by "gen/generator.go". //template:begin delete
218217
func (r *FabricEWLCResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {
219218
var state FabricEWLC
220219

@@ -225,8 +224,12 @@ func (r *FabricEWLCResource) Delete(ctx context.Context, req resource.DeleteRequ
225224
return
226225
}
227226

227+
// Prepare body with enableWireless set to false
228+
state.EnableWireless = types.BoolValue(false)
229+
body := state.toBody(ctx, state)
230+
228231
tflog.Debug(ctx, fmt.Sprintf("%s: Beginning Delete", state.Id.ValueString()))
229-
res, err := r.client.Put(state.getPath(), "{}", cc.UseMutex)
232+
res, err := r.client.Put(state.getPath(), body, cc.UseMutex)
230233
if err != nil && !strings.Contains(err.Error(), "StatusCode 404") {
231234
errorCode := res.Get("response.errorCode").String()
232235
if strings.HasPrefix(errorCode, "NCND") {
@@ -244,7 +247,5 @@ func (r *FabricEWLCResource) Delete(ctx context.Context, req resource.DeleteRequ
244247
resp.State.RemoveResource(ctx)
245248
}
246249

247-
// End of section. //template:end delete
248-
249250
// Section below is generated&owned by "gen/generator.go". //template:begin import
250251
// End of section. //template:end import

0 commit comments

Comments
 (0)