Skip to content

Commit 5e5cd10

Browse files
authored
chore: bump SDK version (#710)
1 parent 34bed3f commit 5e5cd10

17 files changed

+45
-41
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
id: import_gpg
3535
run: |
3636
gpg-agent --daemon --allow-preset-passphrase
37-
gpg --batch --import --yes <(echo "${{ secrets.GPG_PRIVATE_KEY }}")
37+
gpg --batch --import --yes <(echo '${{ secrets.GPG_PRIVATE_KEY }}')
3838
export KEY_FINGERPRINT=$(gpg --list-secret-keys --with-colons | grep sec | cut -d ':' -f 5)
3939
export KEY_GRIP=$(gpg-connect-agent 'KEYINFO --list' /bye | grep KEYINFO | cut -d ' ' -f 3)
40-
export PASSPHRASE_HEX=$(echo -n "${{ secrets.GPG_PASSPHRASE }}" | xxd -p -u -c 265)
40+
export PASSPHRASE_HEX=$(echo -n '${{ secrets.GPG_PASSPHRASE }}' | xxd -p -u -c 265)
4141
gpg-connect-agent "PRESET_PASSPHRASE $KEY_GRIP -1 $PASSPHRASE_HEX" /bye
4242
echo "::set-output name=fingerprint::$KEY_FINGERPRINT"
4343
-

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/hashicorp/terraform-plugin-sdk v1.0.0
88
github.com/mitchellh/go-homedir v1.1.0
99
github.com/nicolai86/scaleway-sdk v0.0.0-20181024210327-b20018e944c4
10-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6.0.20200625143330-d3e0c6c20474
10+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20201117145121-3abc1efd92f7
1111
github.com/stretchr/testify v1.3.0
1212
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586
1313
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
181181
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
182182
github.com/posener/complete v1.2.1 h1:LrvDIY//XNo65Lq84G/akBuMGlawHvGBABv8f/ZN6DI=
183183
github.com/posener/complete v1.2.1/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E=
184-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6.0.20200625143330-d3e0c6c20474 h1:IkOChjasZthcGbr7j/7+KDneeQb/dcwQp+GeHLpiXNE=
185-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.6.0.20200625143330-d3e0c6c20474/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
184+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20201117145121-3abc1efd92f7 h1:3C29wFZO2XQD+gRMDUED0pbu12dBC4TktQIzV7zmOnU=
185+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20201117145121-3abc1efd92f7/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
186186
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
187187
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
188188
github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=

scaleway/data_source_instance_image.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func dataSourceScalewayInstanceImageRead(d *schema.ResourceData, m interface{})
114114
return fmt.Errorf("%d images found with the same name %s and architecture %s in zone %s", len(res.Images), d.Get("name"), d.Get("architecture"), zone)
115115
}
116116
sort.Slice(res.Images, func(i, j int) bool {
117-
return res.Images[i].ModificationDate.After(res.Images[j].ModificationDate)
117+
return res.Images[i].ModificationDate.After(*res.Images[j].ModificationDate)
118118
})
119119
imageID = res.Images[0].ID
120120
}
@@ -138,8 +138,8 @@ func dataSourceScalewayInstanceImageRead(d *schema.ResourceData, m interface{})
138138
_ = d.Set("architecture", resp.Image.Arch)
139139
_ = d.Set("name", resp.Image.Name)
140140

141-
_ = d.Set("creation_date", flattenTime(&resp.Image.CreationDate))
142-
_ = d.Set("modification_date", flattenTime(&resp.Image.ModificationDate))
141+
_ = d.Set("creation_date", flattenTime(resp.Image.CreationDate))
142+
_ = d.Set("modification_date", flattenTime(resp.Image.ModificationDate))
143143
_ = d.Set("public", resp.Image.Public)
144144
_ = d.Set("from_server_id", resp.Image.FromServer)
145145
_ = d.Set("state", resp.Image.State.String())

scaleway/resource_baremetal_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func resourceScalewayBaremetalServerCreate(d *schema.ResourceData, m interface{}
138138
server, err := baremetalAPI.CreateServer(&baremetal.CreateServerRequest{
139139
Zone: zone,
140140
Name: expandOrGenerateString(d.Get("name"), "bm"),
141-
OrganizationID: d.Get("organization_id").(string),
141+
OrganizationID: scw.StringPtr(d.Get("organization_id").(string)),
142142
Description: d.Get("description").(string),
143143
OfferID: offerID.ID,
144144
Tags: expandStrings(d.Get("tags")),

scaleway/resource_instance_placement_group.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
55
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
66
"github.com/scaleway/scaleway-sdk-go/api/instance/v1"
7+
"github.com/scaleway/scaleway-sdk-go/scw"
78
)
89

910
func resourceScalewayInstancePlacementGroup() *schema.Resource {
@@ -63,7 +64,7 @@ func resourceScalewayInstancePlacementGroupCreate(d *schema.ResourceData, m inte
6364
res, err := instanceApi.CreatePlacementGroup(&instance.CreatePlacementGroupRequest{
6465
Zone: zone,
6566
Name: expandOrGenerateString(d.Get("name"), "pg"),
66-
Organization: d.Get("organization_id").(string),
67+
Organization: scw.StringPtr(d.Get("organization_id").(string)),
6768
PolicyMode: instance.PlacementGroupPolicyMode(d.Get("policy_mode").(string)),
6869
PolicyType: instance.PlacementGroupPolicyType(d.Get("policy_type").(string)),
6970
})
@@ -109,11 +110,13 @@ func resourceScalewayInstancePlacementGroupUpdate(d *schema.ResourceData, m inte
109110
if err != nil {
110111
return err
111112
}
113+
policyMode := instance.PlacementGroupPolicyMode(d.Get("policy_mode").(string))
114+
policyType := instance.PlacementGroupPolicyType(d.Get("policy_type").(string))
112115
req := &instance.UpdatePlacementGroupRequest{
113116
Zone: zone,
114117
PlacementGroupID: ID,
115-
PolicyMode: instance.PlacementGroupPolicyMode(d.Get("policy_mode").(string)),
116-
PolicyType: instance.PlacementGroupPolicyType(d.Get("policy_type").(string)),
118+
PolicyMode: &policyMode,
119+
PolicyType: &policyType,
117120
}
118121

119122
hasChanged := d.HasChange("policy_mode") || d.HasChange("policy_type")

scaleway/resource_instance_security_group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func resourceScalewayInstanceSecurityGroupCreate(d *schema.ResourceData, m inter
9999
res, err := instanceApi.CreateSecurityGroup(&instance.CreateSecurityGroupRequest{
100100
Name: expandOrGenerateString(d.Get("name"), "sg"),
101101
Zone: zone,
102-
Organization: organizationID,
102+
Organization: scw.StringPtr(organizationID),
103103
Description: d.Get("description").(string),
104104
Stateful: d.Get("stateful").(bool),
105105
InboundDefaultPolicy: instance.SecurityGroupPolicy(d.Get("inbound_default_policy").(string)),

scaleway/resource_instance_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func resourceScalewayInstanceServerCreate(d *schema.ResourceData, m interface{})
248248
req := &instance.CreateServerRequest{
249249
Zone: zone,
250250
Name: expandOrGenerateString(d.Get("name"), "srv"),
251-
Organization: d.Get("organization_id").(string),
251+
Organization: scw.StringPtr(d.Get("organization_id").(string)),
252252
Image: image.ID,
253253
CommercialType: commercialType,
254254
EnableIPv6: d.Get("enable_ipv6").(bool),

scaleway/resource_instance_volume.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func resourceScalewayInstanceVolumeCreate(d *schema.ResourceData, m interface{})
8181
Zone: zone,
8282
Name: expandOrGenerateString(d.Get("name"), "vol"),
8383
VolumeType: instance.VolumeVolumeType(d.Get("type").(string)),
84-
Organization: d.Get("organization_id").(string),
84+
Organization: scw.StringPtr(d.Get("organization_id").(string)),
8585
}
8686

8787
if size, ok := d.GetOk("size_in_gb"); ok {

scaleway/resource_k8s_cluster_beta.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ func resourceScalewayK8SClusterBetaCreate(d *schema.ResourceData, m interface{})
357357

358358
req := &k8s.CreateClusterRequest{
359359
Region: region,
360-
OrganizationID: d.Get("organization_id").(string),
360+
OrganizationID: scw.StringPtr(d.Get("organization_id").(string)),
361361
Name: expandOrGenerateString(d.Get("name"), "cluster"),
362362
Description: description.(string),
363363
Cni: k8s.CNI(d.Get("cni").(string)),

0 commit comments

Comments
 (0)