fix(deps): update module github.com/stackitcloud/stackit-sdk-go/services/iaas to v0.4.0 (#397)

* fix(deps): update module github.com/stackitcloud/stackit-sdk-go/services/iaas to v0.4.0

* add network to the return value of createNetwork

* add info logs

* remove obsolete logs and return value

---------

Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
Co-authored-by: Gökçe Gök Klingel <goekce.goek_klingel@mail.schwarz>
This commit is contained in:
stackit-pipeline 2024-06-11 13:24:21 +02:00 committed by GitHub
parent 10b566c2f6
commit bd3e04e134
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

2
go.mod
View file

@ -14,7 +14,7 @@ require (
github.com/stackitcloud/stackit-sdk-go/core v0.12.0
github.com/stackitcloud/stackit-sdk-go/services/argus v0.11.0
github.com/stackitcloud/stackit-sdk-go/services/dns v0.10.0
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.3.0
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.12.0
github.com/stackitcloud/stackit-sdk-go/services/logme v0.15.0
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.15.0

4
go.sum
View file

@ -150,8 +150,8 @@ github.com/stackitcloud/stackit-sdk-go/services/argus v0.11.0 h1:JVEx/ouHB6PlwGz
github.com/stackitcloud/stackit-sdk-go/services/argus v0.11.0/go.mod h1:nVllQfYODhX1q3bgwVTLO7wHOp+8NMLiKbn3u/Dg5nU=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.10.0 h1:QIZfs6nJ/l2pOweH1E+wazXnlAUtqisVbYUxWAokTbc=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.10.0/go.mod h1:MdZcRbs19s2NLeJmSLSoqTzm9IPIQhE1ZEMpo9gePq0=
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.3.0 h1:0Nb7CruTyM/HxhZQjntQUHJqwCoKjFUC9KZcBBj+c5c=
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.3.0/go.mod h1:XtJA9FMK/yJ0dj4HtRAogmZPRUsZiFcuwUSfHYNASjo=
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.4.0 h1:W6Zxyq487RpWfEIb6GL7tGTt5SsBzxHPeYTzmB11GtY=
github.com/stackitcloud/stackit-sdk-go/services/iaas v0.4.0/go.mod h1:XtJA9FMK/yJ0dj4HtRAogmZPRUsZiFcuwUSfHYNASjo=
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.12.0 h1:LAteZO46XmqTsmPw0QV8n8WiGM205pxrcqHqWznNmyY=
github.com/stackitcloud/stackit-sdk-go/services/loadbalancer v0.12.0/go.mod h1:wsO3+vXe1XiKLeCIctWAptaHQZ07Un7kmLTQ+drbj7w=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.15.0 h1:7gii3PZshOesHPCYlPycilXglk28imITIqjewySZwZ4=

View file

@ -183,11 +183,12 @@ func (r *networkResource) Create(ctx context.Context, req resource.CreateRequest
// Create new network
var httpResp *http.Response
ctxWithHTTPResp := runtime.WithCaptureHTTPResponse(ctx, &httpResp)
err = r.client.CreateNetwork(ctxWithHTTPResp, projectId).CreateNetworkPayload(*payload).Execute()
_, err = r.client.CreateNetwork(ctxWithHTTPResp, projectId).CreateNetworkPayload(*payload).Execute()
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error creating network", fmt.Sprintf("Calling API: %v", err))
return
}
network, err := wait.CreateNetworkWaitHandler(ctx, r.client, projectId, httpResp.Header.Get("x-request-id")).WaitWithContext(context.Background())
if err != nil {
core.LogAndAddError(ctx, &resp.Diagnostics, "Error creating network", fmt.Sprintf("Network creation waiting: %v", err))