diff --git a/go.mod b/go.mod index bb7579546..2d0ab0a2f 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/outscale/terraform-provider-outscale go 1.22.0 require ( - github.com/aws/aws-sdk-go v1.55.1 + github.com/aws/aws-sdk-go v1.55.5 github.com/davecgh/go-spew v1.1.1 github.com/go-test/deep v1.0.6 github.com/hashicorp/errwrap v1.1.0 @@ -58,7 +58,7 @@ require ( golang.org/x/crypto v0.23.0 // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.25.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/oauth2 v0.22.0 // indirect golang.org/x/sys v0.20.0 // indirect golang.org/x/text v0.15.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index 30ec40762..b5754e1d8 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJE github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/aws/aws-sdk-go v1.44.103/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.55.1 h1:ZTNPmbRMxaK5RlTJrBullX9r/rF1MPf3yAJOLlwDiT8= -github.com/aws/aws-sdk-go v1.55.1/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= @@ -197,8 +197,8 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/outscale/resource_outscale_vpn_connection.go b/outscale/resource_outscale_vpn_connection.go index ed90789b1..9e9723ef1 100644 --- a/outscale/resource_outscale_vpn_connection.go +++ b/outscale/resource_outscale_vpn_connection.go @@ -272,12 +272,16 @@ func vpnConnectionRefreshFunc(conn *oscgo.APIClient, vpnConnectionID *string) re } resp, httpResp, err := conn.VpnConnectionApi.ReadVpnConnections(context.Background()).ReadVpnConnectionsRequest(filter).Execute() if err != nil { - switch { - case httpResp.StatusCode == http.StatusServiceUnavailable: - return nil, "pending", nil - case httpResp.StatusCode == http.StatusNotFound: - return nil, "deleted", nil - default: + if httpResp != nil { + switch { + case httpResp.StatusCode == http.StatusServiceUnavailable: + return nil, "pending", nil + case httpResp.StatusCode == http.StatusNotFound: + return nil, "deleted", nil + default: + return nil, "failed", fmt.Errorf("Error on vpnConnectionRefresh: %s", err) + } + } else { return nil, "failed", fmt.Errorf("Error on vpnConnectionRefresh: %s", err) } } diff --git a/tests/qa_provider_oapi/data/flexible_gpu_catalog/TF-176_flexible_gpu_catalog_datasource_attributes_ok/step1.flexible_gpu_catalog_datasource_attributes_ok.ref b/tests/qa_provider_oapi/data/flexible_gpu_catalog/TF-176_flexible_gpu_catalog_datasource_attributes_ok/step1.flexible_gpu_catalog_datasource_attributes_ok.ref index 009638f02..8894c337c 100644 --- a/tests/qa_provider_oapi/data/flexible_gpu_catalog/TF-176_flexible_gpu_catalog_datasource_attributes_ok/step1.flexible_gpu_catalog_datasource_attributes_ok.ref +++ b/tests/qa_provider_oapi/data/flexible_gpu_catalog/TF-176_flexible_gpu_catalog_datasource_attributes_ok/step1.flexible_gpu_catalog_datasource_attributes_ok.ref @@ -18,22 +18,21 @@ "flexible_gpu_catalog": [ { "generations": [ - "v5", - "v6" + "v7" ], - "max_cpu": 35, - "max_ram": 250, - "model_name": "nvidia-a10", - "v_ram": 24000 + "max_cpu": 60, + "max_ram": 384, + "model_name": "nvidia-h100", + "v_ram": 80000 }, { "generations": [ - "v7" + "v6" ], "max_cpu": 35, - "max_ram": 250, - "model_name": "nvidia-l40", - "v_ram": 48000 + "max_ram": 256, + "model_name": "nvidia-a100-80", + "v_ram": 80000 }, { "generations": [ @@ -42,18 +41,39 @@ ], "max_cpu": 80, "max_ram": 512, - "model_name": "nvidia-m60", - "v_ram": 16000 + "model_name": "nvidia-k2", + "v_ram": 4096 }, { "generations": [ - "v5" + "v3", + "v4" ], "max_cpu": 80, "max_ram": 512, - "model_name": "nvidia-p6", + "model_name": "nvidia-m60", "v_ram": 16000 }, + { + "generations": [ + "v5", + "v6" + ], + "max_cpu": 35, + "max_ram": 250, + "model_name": "nvidia-a10", + "v_ram": 24000 + }, + { + "generations": [ + "v5", + "v6" + ], + "max_cpu": 35, + "max_ram": 250, + "model_name": "nvidia-a100", + "v_ram": 40000 + }, { "generations": [ "v5" @@ -65,22 +85,12 @@ }, { "generations": [ - "v3", - "v4" + "v5" ], "max_cpu": 80, "max_ram": 512, - "model_name": "nvidia-k2", - "v_ram": 4096 - }, - { - "generations": [ - "v6" - ], - "max_cpu": 35, - "max_ram": 256, - "model_name": "nvidia-a100-80", - "v_ram": 80000 + "model_name": "nvidia-p6", + "v_ram": 16000 }, { "generations": [ @@ -93,13 +103,12 @@ }, { "generations": [ - "v5", - "v6" + "v7" ], "max_cpu": 35, "max_ram": 250, - "model_name": "nvidia-a100", - "v_ram": 40000 + "model_name": "nvidia-l40", + "v_ram": 48000 } ], "id": "##id-0##",