Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newrelic - upgrade API version to 2024-03-01 #27135

Merged
merged 9 commits into from
Oct 24, 2024
4 changes: 2 additions & 2 deletions internal/services/newrelic/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package client
import (
"fmt"

"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/monitors"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/monitors"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/tagrules"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)

Expand Down
18 changes: 9 additions & 9 deletions internal/services/newrelic/new_relic_monitor_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/identity"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/monitors"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/monitors"
"github.com/hashicorp/terraform-provider-azurerm/internal/sdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
Expand All @@ -41,10 +41,10 @@ type NewRelicMonitorModel struct {
}

type PlanDataModel struct {
EffectiveDate string `tfschema:"effective_date"`
BillingCycle monitors.BillingCycle `tfschema:"billing_cycle"`
PlanDetails string `tfschema:"plan_id"`
UsageType monitors.UsageType `tfschema:"usage_type"`
EffectiveDate string `tfschema:"effective_date"`
BillingCycle string `tfschema:"billing_cycle"`
PlanDetails string `tfschema:"plan_id"`
UsageType monitors.UsageType `tfschema:"usage_type"`
}

type UserInfoModel struct {
Expand Down Expand Up @@ -105,11 +105,11 @@ func (r NewRelicMonitorResource) Arguments() map[string]*pluginsdk.Schema {
Type: pluginsdk.TypeString,
Optional: true,
ForceNew: true,
Default: string(monitors.BillingCycleMONTHLY),
Default: "MONTHLY",
ValidateFunc: validation.StringInSlice([]string{
string(monitors.BillingCycleMONTHLY),
string(monitors.BillingCycleWEEKLY),
string(monitors.BillingCycleYEARLY),
"MONTHLY",
"WEEKLY",
"YEARLY",
Comment on lines +109 to +113
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason these are no longer constants? could we open an issue on the rest specs asking and link it here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @katbyte , from service team, earlier there was limit on values that this field can have, now that limitation has lifted. There will be new values in the future.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why that means there is no longer an enum/defined in the rest API specs? i cannot see any reason why these values shouldn't be captures there. could we place open an issue on the rest specs + link it here?

}, false),
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/monitors"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/monitors"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down
4 changes: 2 additions & 2 deletions internal/services/newrelic/new_relic_tag_rule_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/monitors"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/monitors"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/tagrules"
"github.com/hashicorp/terraform-provider-azurerm/internal/sdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules"
"github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/tagrules"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance"
"github.com/hashicorp/terraform-provider-azurerm/internal/acceptance/check"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -851,8 +851,8 @@ github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/webapplica
github.com/hashicorp/go-azure-sdk/resource-manager/network/2023-11-01/webcategories
github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/azuretrafficcollectors
github.com/hashicorp/go-azure-sdk/resource-manager/networkfunction/2022-11-01/collectorpolicies
github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/monitors
github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2022-07-01/tagrules
github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/monitors
github.com/hashicorp/go-azure-sdk/resource-manager/newrelic/2024-03-01/tagrules
github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview
github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxcertificate
github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2024-01-01-preview/nginxconfiguration
Expand Down
Loading