From 7ce19c1b951f0fd74944d0d763394bc06c8e83f2 Mon Sep 17 00:00:00 2001 From: vinay-newrelic Date: Wed, 4 Dec 2024 14:50:54 +0530 Subject: [PATCH] fix(synthetics): Fix to detect differences in locations_public of sythetics script monitor (#2775) --- newrelic/resource_newrelic_synthetics_script_monitor.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/newrelic/resource_newrelic_synthetics_script_monitor.go b/newrelic/resource_newrelic_synthetics_script_monitor.go index 81c7b89a6..7b5638017 100644 --- a/newrelic/resource_newrelic_synthetics_script_monitor.go +++ b/newrelic/resource_newrelic_synthetics_script_monitor.go @@ -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 { @@ -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),