Skip to content

Commit 787bb93

Browse files
✨ Delete AWS serverless integration when the TF resource is destroyed. (#125)
1 parent 2de9145 commit 787bb93

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

internal/provider/integration_aws_serverless_resource.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,11 @@ func (r *integrationAwsServerlessResource) Delete(ctx context.Context, req resou
434434
return
435435
}
436436

437-
// Delete API call logic
437+
_, err := r.client.DeleteIntegration(ctx, data.Mrn.ValueString())
438+
if err != nil {
439+
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Unable to delete AWS serverless integration, got error: %s", err))
440+
return
441+
}
438442
}
439443

440444
func (r *integrationAwsServerlessResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {

0 commit comments

Comments
 (0)