Skip to content

Commit

Permalink
feat(dashboards): Addressed pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vinay-newrelic authored and pranav-new-relic committed Oct 28, 2024
1 parent b3a736c commit 6a6ee50
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions newrelic/resource_newrelic_one_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package newrelic

import (
"context"
"encoding/json"
"fmt"
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
Expand Down Expand Up @@ -897,11 +895,6 @@ func resourceNewRelicOneDashboardRead(ctx context.Context, d *schema.ResourceDat
log.Printf("[INFO] Reading New Relic One dashboard %s", d.Id())

dashboard, err := client.Dashboards.GetDashboardEntityWithContext(ctx, common.EntityGUID(d.Id()))
// Convert the dashboard object to a pretty-printed JSON string
_, er := json.MarshalIndent(dashboard, "", " ")
if er != nil {
fmt.Println("Error marshalling dashboard:", er)
}

if err != nil {
if _, ok := err.(*errors.NotFound); ok {
Expand Down

0 comments on commit 6a6ee50

Please sign in to comment.