@@ -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
218217func (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