diff --git a/go.mod b/go.mod index c0e9c1060..eb9eccfab 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,6 @@ require ( github.com/hashicorp/terraform-plugin-sdk v1.8.0 github.com/newrelic/go-agent/v3 v3.4.0 github.com/newrelic/go-insights v1.0.3 - github.com/newrelic/newrelic-client-go v0.23.0 + github.com/newrelic/newrelic-client-go v0.23.1 github.com/stretchr/testify v1.5.1 ) diff --git a/go.sum b/go.sum index 953f9a4d4..9c1af9329 100644 --- a/go.sum +++ b/go.sum @@ -464,6 +464,8 @@ github.com/newrelic/go-insights v1.0.3 h1:zSNp1CEZnXktzSIEsbHJk8v6ZihdPFP2WsO/fz github.com/newrelic/go-insights v1.0.3/go.mod h1:A20BoT8TNkqPGX2nS/Z2fYmKl3Cqa3iKZd4whzedCY4= github.com/newrelic/newrelic-client-go v0.23.0 h1:SNqudEOG0DBmRsBdsWNfWlPF8P6Csfnnhv3+D9XGI24= github.com/newrelic/newrelic-client-go v0.23.0/go.mod h1:Kql4o4D5et8WS8c4O/7ZdH2QcTX6zYtoIrbdlhwg+Oc= +github.com/newrelic/newrelic-client-go v0.23.1 h1:7LEo9zZVy6A51KNb+OVez3dXKMZOSzkkH+iw6av703A= +github.com/newrelic/newrelic-client-go v0.23.1/go.mod h1:Kql4o4D5et8WS8c4O/7ZdH2QcTX6zYtoIrbdlhwg+Oc= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= diff --git a/vendor/github.com/newrelic/newrelic-client-go/internal/version/version.go b/vendor/github.com/newrelic/newrelic-client-go/internal/version/version.go index 1fcf565fb..0b83aed5a 100644 --- a/vendor/github.com/newrelic/newrelic-client-go/internal/version/version.go +++ b/vendor/github.com/newrelic/newrelic-client-go/internal/version/version.go @@ -1,4 +1,4 @@ package version // Version of this library -const Version string = "0.23.0" +const Version string = "0.23.1" diff --git a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/channels.go b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/channels.go index 7a54fa8e9..7d7be21bb 100644 --- a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/channels.go +++ b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/channels.go @@ -76,11 +76,11 @@ type ChannelConfiguration struct { // ListChannels returns all alert channels for a given account. func (a *Alerts) ListChannels() ([]*Channel, error) { alertChannels := []*Channel{} - nextURL := "/alerts_channels.json" + nextURL := a.config.Region().RestURL("/alerts_channels.json") for nextURL != "" { response := alertChannelsResponse{} - resp, err := a.client.Get(a.config.Region().RestURL(nextURL), nil, &response) + resp, err := a.client.Get(nextURL, nil, &response) if err != nil { return nil, err diff --git a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/conditions.go b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/conditions.go index 941a86150..d991e1d11 100644 --- a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/conditions.go +++ b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/conditions.go @@ -208,11 +208,11 @@ func (a *Alerts) ListConditions(policyID int) ([]*Condition, error) { PolicyID: policyID, } - nextURL := "/alerts_conditions.json" + nextURL := a.config.Region().RestURL("/alerts_conditions.json") for nextURL != "" { response := alertConditionsResponse{} - resp, err := a.client.Get(a.config.Region().RestURL(nextURL), &queryParams, &response) + resp, err := a.client.Get(nextURL, &queryParams, &response) if err != nil { return nil, err diff --git a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/incidents.go b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/incidents.go index 6e7847b97..95ac513f4 100644 --- a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/incidents.go +++ b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/incidents.go @@ -29,11 +29,11 @@ func (a *Alerts) ListIncidents(onlyOpen bool, excludeViolations bool) ([]*Incide ExcludeViolations: excludeViolations, } - nextURL := "/alerts_incidents.json" + nextURL := a.config.Region().RestURL("/alerts_incidents.json") for nextURL != "" { incidentsResponse := alertIncidentsResponse{} - resp, err := a.client.Get(a.config.Region().RestURL(nextURL), queryParams, &incidentsResponse) + resp, err := a.client.Get(nextURL, queryParams, &incidentsResponse) if err != nil { return nil, err diff --git a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/multi_location_synthetics_conditions.go b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/multi_location_synthetics_conditions.go index 699b47f1a..ec3147e9e 100644 --- a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/multi_location_synthetics_conditions.go +++ b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/multi_location_synthetics_conditions.go @@ -2,6 +2,7 @@ package alerts import ( "fmt" + "strconv" ) // MultiLocationSyntheticsCondition represents a location-based failure condition. @@ -35,10 +36,10 @@ func (a *Alerts) ListMultiLocationSyntheticsConditions(policyID int) ([]*MultiLo PolicyID: policyID, } - nextURL := fmt.Sprintf("/alerts_location_failure_conditions/policies/%d.json", policyID) + nextURL := a.config.Region().RestURL("/alerts_location_failure_conditions/policies/", strconv.Itoa(policyID)+".json") for nextURL != "" { - resp, err := a.client.Get(a.config.Region().RestURL(nextURL), &queryParams, &response) + resp, err := a.client.Get(nextURL, &queryParams, &response) if err != nil { return nil, err diff --git a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/nrql_conditions.go b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/nrql_conditions.go index 0789304df..96c531639 100644 --- a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/nrql_conditions.go +++ b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/nrql_conditions.go @@ -205,11 +205,11 @@ func (a *Alerts) ListNrqlConditions(policyID int) ([]*NrqlCondition, error) { PolicyID: policyID, } - nextURL := "/alerts_nrql_conditions.json" + nextURL := a.config.Region().RestURL("/alerts_nrql_conditions.json") for nextURL != "" { response := nrqlConditionsResponse{} - resp, err := a.client.Get(a.config.Region().RestURL(nextURL), &queryParams, &response) + resp, err := a.client.Get(nextURL, &queryParams, &response) if err != nil { return nil, err diff --git a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/plugins_conditions.go b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/plugins_conditions.go index 2487bafc9..f889e8484 100644 --- a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/plugins_conditions.go +++ b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/plugins_conditions.go @@ -33,11 +33,11 @@ func (a *Alerts) ListPluginsConditions(policyID int) ([]*PluginsCondition, error PolicyID: policyID, } - nextURL := "/alerts_plugins_conditions.json" + nextURL := a.config.Region().RestURL("/alerts_plugins_conditions.json") for nextURL != "" { response := pluginsConditionsResponse{} - resp, err := a.client.Get(a.config.Region().RestURL(nextURL), &queryParams, &response) + resp, err := a.client.Get(nextURL, &queryParams, &response) if err != nil { return nil, err diff --git a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/synthetics_conditions.go b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/synthetics_conditions.go index 0a33fd470..a3cf33e2a 100644 --- a/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/synthetics_conditions.go +++ b/vendor/github.com/newrelic/newrelic-client-go/pkg/alerts/synthetics_conditions.go @@ -18,14 +18,14 @@ type SyntheticsCondition struct { // ListSyntheticsConditions returns a list of Synthetics alert conditions for a given policy. func (a *Alerts) ListSyntheticsConditions(policyID int) ([]*SyntheticsCondition, error) { conditions := []*SyntheticsCondition{} - nextURL := "/alerts_synthetics_conditions.json" + nextURL := a.config.Region().RestURL("/alerts_synthetics_conditions.json") queryParams := listSyntheticsConditionsParams{ PolicyID: policyID, } for nextURL != "" { response := syntheticsConditionsResponse{} - resp, err := a.client.Get(a.config.Region().RestURL(nextURL), &queryParams, &response) + resp, err := a.client.Get(nextURL, &queryParams, &response) if err != nil { return nil, err diff --git a/vendor/modules.txt b/vendor/modules.txt index 201aa1fba..b29ff5419 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -469,7 +469,7 @@ github.com/newrelic/go-agent/v3/internal/utilization github.com/newrelic/go-agent/v3/newrelic # github.com/newrelic/go-insights v1.0.3 github.com/newrelic/go-insights/client -# github.com/newrelic/newrelic-client-go v0.23.0 +# github.com/newrelic/newrelic-client-go v0.23.1 github.com/newrelic/newrelic-client-go/internal/http github.com/newrelic/newrelic-client-go/internal/logging github.com/newrelic/newrelic-client-go/internal/serialization