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:
parent
10b566c2f6
commit
bd3e04e134
3 changed files with 5 additions and 4 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue