Skip to content

Commit

Permalink
✨ Delete AWS serverless integration when the TF resource is destroyed. (
Browse files Browse the repository at this point in the history
  • Loading branch information
preslavgerchev authored Jul 30, 2024
1 parent 2de9145 commit 787bb93
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/provider/integration_aws_serverless_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,11 @@ func (r *integrationAwsServerlessResource) Delete(ctx context.Context, req resou
return
}

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

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

0 comments on commit 787bb93

Please sign in to comment.