Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require (
github.com/nats-io/jwt/v2 v2.8.0
github.com/nats-io/nats.go v1.46.1
github.com/robfig/cron/v3 v3.0.1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251017125838-3eb0f2adaa94
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251125140454-267e13d60597
github.com/stretchr/testify v1.11.1
golang.org/x/crypto v0.45.0
golang.org/x/sync v0.18.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251017125838-3eb0f2adaa94 h1:39j+3zweuYVml1Ozahl7RVb0AtpaiQtRztjq4W3GvNM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251017125838-3eb0f2adaa94/go.mod h1:SVm1Zk6UpZtqZN6KtEQpjC+v+Lir4tyVfhQTU19q3PA=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251125140454-267e13d60597 h1:PfrwuNnzQ7H8nB+qUkDBgB7wsX9fL3yUjO/kjc8WCg8=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35.0.20251125140454-267e13d60597/go.mod h1:BBENv1W9QH4COViJkDJB/0D1T6CweMAkDP7XehRsHQ8=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
Expand Down
8 changes: 4 additions & 4 deletions internal/services/cockpit/alert_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func ResourceCockpitAlertManagerCreate(ctx context.Context, d *schema.ResourceDa
}

if EnableManagedAlerts {
_, err = api.EnableManagedAlerts(&cockpit.RegionalAPIEnableManagedAlertsRequest{
_, err = api.EnableManagedAlerts(&cockpit.RegionalAPIEnableManagedAlertsRequest{ //nolint:staticcheck // legacy managed alerts path
Region: region,
ProjectID: projectID,
})
Expand Down Expand Up @@ -182,12 +182,12 @@ func ResourceCockpitAlertManagerUpdate(ctx context.Context, d *schema.ResourceDa
if d.HasChange("enable_managed_alerts") {
enable := d.Get("enable_managed_alerts").(bool)
if enable {
_, err = api.EnableManagedAlerts(&cockpit.RegionalAPIEnableManagedAlertsRequest{
_, err = api.EnableManagedAlerts(&cockpit.RegionalAPIEnableManagedAlertsRequest{ //nolint:staticcheck // legacy managed alerts path
Region: region,
ProjectID: projectID,
})
} else {
_, err = api.DisableManagedAlerts(&cockpit.RegionalAPIDisableManagedAlertsRequest{
_, err = api.DisableManagedAlerts(&cockpit.RegionalAPIDisableManagedAlertsRequest{ //nolint:staticcheck // legacy managed alerts path
Region: region,
ProjectID: projectID,
}, scw.WithContext(ctx))
Expand Down Expand Up @@ -284,7 +284,7 @@ func ResourceCockpitAlertManagerDelete(ctx context.Context, d *schema.ResourceDa
}
}

_, err = api.DisableManagedAlerts(&cockpit.RegionalAPIDisableManagedAlertsRequest{
_, err = api.DisableManagedAlerts(&cockpit.RegionalAPIDisableManagedAlertsRequest{ //nolint:staticcheck // legacy managed alerts path
Region: region,
ProjectID: projectID,
}, scw.WithContext(ctx))
Expand Down
6 changes: 3 additions & 3 deletions internal/services/cockpit/grafana_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func ResourceCockpitGrafanaUserCreate(ctx context.Context, d *schema.ResourceDat
login := d.Get("login").(string)
role := cockpit.GrafanaUserRole(d.Get("role").(string))

grafanaUser, err := api.CreateGrafanaUser(&cockpit.GlobalAPICreateGrafanaUserRequest{
grafanaUser, err := api.CreateGrafanaUser(&cockpit.GlobalAPICreateGrafanaUserRequest{ //nolint:staticcheck // legacy Grafana user resource uses deprecated API
ProjectID: projectID,
Login: login,
Role: role,
Expand All @@ -93,7 +93,7 @@ func ResourceCockpitGrafanaUserRead(ctx context.Context, d *schema.ResourceData,
return diag.FromErr(err)
}

res, err := api.ListGrafanaUsers(&cockpit.GlobalAPIListGrafanaUsersRequest{
res, err := api.ListGrafanaUsers(&cockpit.GlobalAPIListGrafanaUsersRequest{ //nolint:staticcheck // legacy Grafana user resource uses deprecated API
ProjectID: projectID,
}, scw.WithContext(ctx), scw.WithAllPages())
if err != nil {
Expand Down Expand Up @@ -149,7 +149,7 @@ func ResourceCockpitGrafanaUserDelete(ctx context.Context, d *schema.ResourceDat
return diag.FromErr(err)
}

err = api.DeleteGrafanaUser(&cockpit.GlobalAPIDeleteGrafanaUserRequest{
err = api.DeleteGrafanaUser(&cockpit.GlobalAPIDeleteGrafanaUserRequest{ //nolint:staticcheck // legacy Grafana user resource uses deprecated API
ProjectID: projectID,
GrafanaUserID: grafanaUserID,
}, scw.WithContext(ctx))
Expand Down
4 changes: 2 additions & 2 deletions internal/services/cockpit/grafana_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func isGrafanaUserPresent(tt *acctest.TestTools, n string) resource.TestCheckFun
return err
}

res, err := api.ListGrafanaUsers(&cockpitSDK.GlobalAPIListGrafanaUsersRequest{
res, err := api.ListGrafanaUsers(&cockpitSDK.GlobalAPIListGrafanaUsersRequest{ //nolint:staticcheck // legacy Grafana user resource uses deprecated API
ProjectID: projectID,
}, scw.WithAllPages())
if err != nil {
Expand Down Expand Up @@ -169,7 +169,7 @@ func isGrafanaUserDestroyed(tt *acctest.TestTools) resource.TestCheckFunc {
return err
}

err = api.DeleteGrafanaUser(&cockpitSDK.GlobalAPIDeleteGrafanaUserRequest{
err = api.DeleteGrafanaUser(&cockpitSDK.GlobalAPIDeleteGrafanaUserRequest{ //nolint:staticcheck // legacy Grafana user resource uses deprecated API
ProjectID: projectID,
GrafanaUserID: grafanaUserID,
})
Expand Down
4 changes: 2 additions & 2 deletions internal/services/cockpit/testfuncs/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func testSweepCockpitGrafanaUser(_ string) error {
continue
}

listGrafanaUsers, err := cockpitAPI.ListGrafanaUsers(&cockpit.GlobalAPIListGrafanaUsersRequest{
listGrafanaUsers, err := cockpitAPI.ListGrafanaUsers(&cockpit.GlobalAPIListGrafanaUsersRequest{ //nolint:staticcheck // legacy Grafana user resource uses deprecated API
ProjectID: project.ID,
}, scw.WithAllPages())
if err != nil {
Expand All @@ -100,7 +100,7 @@ func testSweepCockpitGrafanaUser(_ string) error {
}

for _, grafanaUser := range listGrafanaUsers.GrafanaUsers {
err = cockpitAPI.DeleteGrafanaUser(&cockpit.GlobalAPIDeleteGrafanaUserRequest{
err = cockpitAPI.DeleteGrafanaUser(&cockpit.GlobalAPIDeleteGrafanaUserRequest{ //nolint:staticcheck // legacy Grafana user resource uses deprecated API
ProjectID: project.ID,
GrafanaUserID: grafanaUser.ID,
})
Expand Down
2 changes: 1 addition & 1 deletion internal/services/file/waiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func waitForFileSystem(ctx context.Context, fileAPI *file.API, region scw.Region
}

fileSystem, err := fileAPI.WaitForFileSystem(&file.WaitForFileSystemRequest{
FileSystemID: id,
FilesystemID: id,
Region: region,
Timeout: scw.TimeDurationPtr(timeout),
RetryInterval: &retryInterval,
Expand Down
1 change: 0 additions & 1 deletion internal/services/k8s/waiters.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func waitClusterStatus(ctx context.Context, k8sAPI *k8s.API, cluster *k8s.Cluste
cluster, err := k8sAPI.WaitForCluster(&k8s.WaitForClusterRequest{
ClusterID: cluster.ID,
Region: cluster.Region,
Status: status,
Timeout: scw.TimeDurationPtr(timeout),
RetryInterval: &retryInterval,
}, scw.WithContext(ctx))
Expand Down
Loading