Skip to content

Commit

Permalink
fix(synthetics): Fix to detect differences in locations_public of syt…
Browse files Browse the repository at this point in the history
…hetics script monitor (#2775)
  • Loading branch information
vinay-newrelic authored Dec 4, 2024
1 parent 4e53db9 commit 7ce19c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion newrelic/resource_newrelic_synthetics_script_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package newrelic

import (
"context"
"log"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"github.com/newrelic/newrelic-client-go/v2/pkg/common"
"github.com/newrelic/newrelic-client-go/v2/pkg/entities"
"github.com/newrelic/newrelic-client-go/v2/pkg/synthetics"
"log"
)

func resourceNewRelicSyntheticsScriptMonitor() *schema.Resource {
Expand Down Expand Up @@ -223,6 +224,9 @@ func resourceNewRelicSyntheticsScriptMonitorRead(ctx context.Context, d *schema.

switch e := (*resp).(type) {
case *entities.SyntheticMonitorEntity:
entity := (*resp).(*entities.SyntheticMonitorEntity)
_ = d.Set("locations_public", getPublicLocationsFromEntityTags(entity.GetTags()))

err = setSyntheticsMonitorAttributes(d, map[string]string{
"name": e.Name,
"type": string(e.MonitorType),
Expand Down

0 comments on commit 7ce19c1

Please sign in to comment.