Skip to content

Commit e8e5e14

Browse files
authored
Upgrade to genesiscloud-go v1.0.11 (#124)
* Upgrade to genesiscloud-go v1.0.11 * Satisfy linter * go mod tidy
1 parent a93d04d commit e8e5e14

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.22.0
55
toolchain go1.23.1
66

77
require (
8-
github.com/genesiscloud/genesiscloud-go v1.0.10
8+
github.com/genesiscloud/genesiscloud-go v1.0.11
99
github.com/hashicorp/go-retryablehttp v0.7.7
1010
github.com/hashicorp/terraform-plugin-docs v0.19.4
1111
github.com/hashicorp/terraform-plugin-framework v1.12.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
4545
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
4646
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
4747
github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps=
48-
github.com/genesiscloud/genesiscloud-go v1.0.10 h1:IGu7c2SOlW3NQ71e8a7wdPUvpLzrjo1gt5unD6CTjCQ=
49-
github.com/genesiscloud/genesiscloud-go v1.0.10/go.mod h1:t2m8sfDGOa8pFio3oitkkjW9YcajyxkiWEu+BHOLyes=
48+
github.com/genesiscloud/genesiscloud-go v1.0.11 h1:SjhBrZ2YXvWspQbfl48lUR+otqXS30QF97fO4TMJXjI=
49+
github.com/genesiscloud/genesiscloud-go v1.0.11/go.mod h1:t2m8sfDGOa8pFio3oitkkjW9YcajyxkiWEu+BHOLyes=
5050
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
5151
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
5252
github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU=

internal/provider/instance_resource.go

+14-2
Original file line numberDiff line numberDiff line change
@@ -460,13 +460,25 @@ func (r *InstanceResource) Update(ctx context.Context, req resource.UpdateReques
460460
if !data.SecurityGroupIds.IsNull() && !data.SecurityGroupIds.IsUnknown() {
461461
var securityGroups []string
462462
data.SecurityGroupIds.ElementsAs(ctx, &securityGroups, false)
463-
body.SecurityGroups = &securityGroups
463+
body.SecurityGroups = &genesiscloud.InstanceUpdateSecurityGroups{}
464+
465+
err := body.SecurityGroups.FromInstanceUpdateSecurityGroupsList(securityGroups)
466+
if err != nil {
467+
resp.Diagnostics.AddError("Client Error", generateErrorMessage("update instance", err))
468+
return
469+
}
464470
}
465471

466472
if !data.VolumeIds.IsNull() && !data.VolumeIds.IsUnknown() {
467473
var volumeIds []string
468474
data.VolumeIds.ElementsAs(ctx, &volumeIds, false)
469-
body.Volumes = &volumeIds
475+
body.Volumes = &genesiscloud.InstanceUpdateVolumes{}
476+
477+
err := body.Volumes.FromInstanceUpdateVolumesList(volumeIds)
478+
if err != nil {
479+
resp.Diagnostics.AddError("Client Error", generateErrorMessage("update instance", err))
480+
return
481+
}
470482
}
471483

472484
if !data.DiskSize.IsNull() && !data.DiskSize.IsUnknown() {

0 commit comments

Comments
 (0)