Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump sdk #1299

Merged
merged 2 commits into from
May 20, 2022
Merged
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 @@ -11,7 +11,7 @@ require (
github.com/hashicorp/go-retryablehttp v0.7.1
github.com/hashicorp/terraform-plugin-log v0.3.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.14.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220426161756-58bfb7aeb801
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220519084803-2eb97e55dee8
github.com/stretchr/testify v1.7.1
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,8 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb
github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220426161756-58bfb7aeb801 h1:Ax1wkrzLs02Z+r+8J2jyvm4gXfoFuw/ChyPmse8hQPo=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220426161756-58bfb7aeb801/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220519084803-2eb97e55dee8 h1:pceJ67Mt+fN2ZkByLGdZ+/ctx+RhvCou14rw44CC2uE=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9.0.20220519084803-2eb97e55dee8/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
Expand Down
12 changes: 0 additions & 12 deletions scaleway/helpers_rdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,6 @@ func rdbAPIWithRegionAndID(m interface{}, id string) (*rdb.API, scw.Region, stri
return newRdbAPI(m), region, ID, nil
}

func flattenRdbInstanceReadReplicas(readReplicas []*rdb.Endpoint) interface{} {
replicasI := []map[string]interface{}(nil)
for _, readReplica := range readReplicas {
replicasI = append(replicasI, map[string]interface{}{
"ip": flattenIPPtr(readReplica.IP),
"port": int(readReplica.Port),
"name": flattenStringPtr(readReplica.Name),
})
}
return replicasI
}

func flattenInstanceSettings(settings []*rdb.InstanceSetting) interface{} {
res := make(map[string]string)
for _, value := range settings {
Expand Down
2 changes: 1 addition & 1 deletion scaleway/resource_rdb_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func resourceScalewayRdbInstanceRead(ctx context.Context, d *schema.ResourceData
_ = d.Set("volume_type", res.Volume.Type)
_ = d.Set("volume_size_in_gb", int(res.Volume.Size/scw.GB))
}
_ = d.Set("read_replicas", flattenRdbInstanceReadReplicas(res.ReadReplicas))
_ = d.Set("read_replicas", []string{})
_ = d.Set("region", string(region))
_ = d.Set("organization_id", res.OrganizationID)
_ = d.Set("project_id", res.ProjectID)
Expand Down