Skip to content

Commit bc047b7

Browse files
committed
Fix
1 parent 7a17d88 commit bc047b7

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module github.com/scaleway/terraform-provider-scaleway/v2
22

33
go 1.24.0
4+
45
require (
56
github.com/aws/aws-sdk-go-v2 v1.36.3
67
github.com/aws/aws-sdk-go-v2/config v1.29.9
@@ -25,7 +26,7 @@ require (
2526
github.com/nats-io/jwt/v2 v2.7.3
2627
github.com/nats-io/nats.go v1.38.0
2728
github.com/robfig/cron/v3 v3.0.1
28-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250320132958-0f59cae533d0
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250407124844-38ab1ca8e81d
2930
github.com/stretchr/testify v1.10.0
3031
golang.org/x/crypto v0.36.0
3132
gopkg.in/dnaeon/go-vcr.v3 v3.2.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
296296
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
297297
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
298298
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
299-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250320132958-0f59cae533d0 h1:aqpUaCWx5ta43b9dZv1bMIvUUJTux9Am+S7RmJbiVN8=
300-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250320132958-0f59cae533d0/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
299+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250407124844-38ab1ca8e81d h1:EjD1RHPgsTomVw0lKgZu6YHK4ZMSBkSjeFrirnvWBcw=
300+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250407124844-38ab1ca8e81d/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
301301
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
302302
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
303303
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=

internal/services/instance/server.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ func ResourceServer() *schema.Resource {
7474
DiffSuppressFunc: dsf.IgnoreCase,
7575
},
7676
"protected": {
77-
Type: schema.TypeBool,
78-
Optional: true,
79-
Default: false,
80-
Description: "If true, the instance is protected against accidental deletion via the Scaleway API.",
77+
Type: schema.TypeBool,
78+
Optional: true,
79+
Default: false,
80+
Description: "If true, the instance is protected against accidental deletion via the Scaleway API.",
8181
},
8282
"replace_on_type_change": {
8383
Type: schema.TypeBool,
@@ -390,7 +390,7 @@ func ResourceInstanceServerCreate(ctx context.Context, d *schema.ResourceData, m
390390
SecurityGroup: types.ExpandStringPtr(zonal.ExpandID(d.Get("security_group_id")).ID),
391391
DynamicIPRequired: scw.BoolPtr(d.Get("enable_dynamic_ip").(bool)),
392392
Tags: types.ExpandStrings(d.Get("tags")),
393-
Protected: scw.BoolPtr(d.Get("protected").(bool)),
393+
Protected: d.Get("protected").(bool),
394394
}
395395

396396
enableIPv6, ok := d.GetOk("enable_ipv6")
@@ -831,7 +831,7 @@ func ResourceInstanceServerUpdate(ctx context.Context, d *schema.ResourceData, m
831831
serverShouldUpdate = true
832832
updateRequest.DynamicIPRequired = scw.BoolPtr(d.Get("enable_dynamic_ip").(bool))
833833
}
834-
834+
835835
if d.HasChange("protected") {
836836
serverShouldUpdate = true
837837
updateRequest.Protected = scw.BoolPtr(d.Get("protected").(bool))

0 commit comments

Comments
 (0)