From fbf9696f938411108f4b00285722d90ba82a541a Mon Sep 17 00:00:00 2001 From: Jonathan Remy Date: Fri, 3 Oct 2025 09:47:04 +0200 Subject: [PATCH] feat: bump scaleway-sdk-go and fix compilation issues --- go.mod | 2 +- go.sum | 4 ++-- internal/services/container/namespace.go | 2 +- internal/services/function/namespace.go | 2 +- internal/services/iam/user.go | 2 +- internal/services/webhosting/webhosting.go | 4 ++-- internal/services/webhosting/webhosting_data_source.go | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 1d5b49f462..b75ea1c89d 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( github.com/nats-io/jwt/v2 v2.8.0 github.com/nats-io/nats.go v1.45.0 github.com/robfig/cron/v3 v3.0.1 - github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250721082157-a9b7a7bd9686 + github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35 github.com/stretchr/testify v1.11.1 golang.org/x/crypto v0.42.0 gopkg.in/dnaeon/go-vcr.v3 v3.2.0 diff --git a/go.sum b/go.sum index 7ce8988b6d..718a5a2aee 100644 --- a/go.sum +++ b/go.sum @@ -456,8 +456,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.34.0.20250721082157-a9b7a7bd9686 h1:rSbtkU5fMMXbv0qwIH5dBq+TvAYnbClahwPP1KtN9bs= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.34.0.20250721082157-a9b7a7bd9686/go.mod h1:fw6BmcfYRs2BEHYW0c3/rR0JgZHvdx6uMYqpeUJx3Bc= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35 h1:8xfn1RzeI9yoCUuEwDy08F+No6PcKZGEDOQ6hrRyLts= +github.com/scaleway/scaleway-sdk-go v1.0.0-beta.35/go.mod h1:47B1d/YXmSAxlJxUJxClzHR6b3T4M1WyCvwENPQNBWc= 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= diff --git a/internal/services/container/namespace.go b/internal/services/container/namespace.go index 38eb26c7a8..408cbaabea 100644 --- a/internal/services/container/namespace.go +++ b/internal/services/container/namespace.go @@ -122,7 +122,7 @@ func ResourceContainerNamespaceCreate(ctx context.Context, d *schema.ResourceDat Name: types.ExpandOrGenerateString(d.Get("name").(string), "ns"), ProjectID: d.Get("project_id").(string), Region: region, - ActivateVpcIntegration: true, + ActivateVpcIntegration: scw.BoolPtr(true), } rawTag, tagExist := d.GetOk("tags") diff --git a/internal/services/function/namespace.go b/internal/services/function/namespace.go index 7930f7b71d..332c5f3efc 100644 --- a/internal/services/function/namespace.go +++ b/internal/services/function/namespace.go @@ -113,7 +113,7 @@ func ResourceFunctionNamespaceCreate(ctx context.Context, d *schema.ResourceData Name: types.ExpandOrGenerateString(d.Get("name").(string), "func"), ProjectID: d.Get("project_id").(string), Region: region, - ActivateVpcIntegration: true, + ActivateVpcIntegration: scw.BoolPtr(true), } rawTag, tagExist := d.GetOk("tags") diff --git a/internal/services/iam/user.go b/internal/services/iam/user.go index 3212e682ea..d111759c11 100644 --- a/internal/services/iam/user.go +++ b/internal/services/iam/user.go @@ -188,7 +188,7 @@ func resourceIamUserRead(ctx context.Context, d *schema.ResourceData, m any) dia _ = d.Set("deletable", user.Deletable) _ = d.Set("last_login_at", types.FlattenTime(user.LastLoginAt)) _ = d.Set("type", user.Type) - _ = d.Set("status", user.Status) + _ = d.Set("status", user.Status.String()) //nolint:staticcheck // convert enum to string for schema compatibility _ = d.Set("mfa", user.Mfa) _ = d.Set("account_root_user_id", user.AccountRootUserID) _ = d.Set("locked", user.Locked) diff --git a/internal/services/webhosting/webhosting.go b/internal/services/webhosting/webhosting.go index c390324b2b..50d352f277 100644 --- a/internal/services/webhosting/webhosting.go +++ b/internal/services/webhosting/webhosting.go @@ -303,7 +303,7 @@ func resourceWebhostingRead(ctx context.Context, d *schema.ResourceData, m any) } dnsRecordsResponse, err := dnsAPI.GetDomainDNSRecords(&webhosting.DNSAPIGetDomainDNSRecordsRequest{ - Domain: webhostingResponse.Domain, + Domain: *webhostingResponse.Domain, //nolint:staticcheck // deprecated in SDK, kept until domain_info fully propagated }, scw.WithContext(ctx)) if err != nil { return diag.FromErr(err) @@ -314,7 +314,7 @@ func resourceWebhostingRead(ctx context.Context, d *schema.ResourceData, m any) _ = d.Set("tags", webhostingResponse.Tags) _ = d.Set("offer_id", regional.NewIDString(region, webhostingResponse.Offer.ID)) - _ = d.Set("domain", webhostingResponse.Domain) + _ = d.Set("domain", webhostingResponse.Domain) //nolint:staticcheck // deprecated in SDK, exported for backward compatibility _ = d.Set("created_at", types.FlattenTime(webhostingResponse.CreatedAt)) _ = d.Set("updated_at", types.FlattenTime(webhostingResponse.UpdatedAt)) _ = d.Set("status", webhostingResponse.Status.String()) diff --git a/internal/services/webhosting/webhosting_data_source.go b/internal/services/webhosting/webhosting_data_source.go index c0f53cf7e9..5277663caf 100644 --- a/internal/services/webhosting/webhosting_data_source.go +++ b/internal/services/webhosting/webhosting_data_source.go @@ -64,7 +64,7 @@ func DataSourceWebhostingRead(ctx context.Context, d *schema.ResourceData, m any foundDomain, err := datasource.FindExact( res.Hostings, - func(s *webhosting.HostingSummary) bool { return s.Domain == hostingDomain }, + func(s *webhosting.HostingSummary) bool { return *s.Domain == hostingDomain }, //nolint:staticcheck // deprecated in SDK, used until domain_info available here hostingDomain, ) if err != nil {