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

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))