fix(deps): update module github.com/stackitcloud/stackit-sdk-go/services/ske to v0.16.0 (#379)
* fix(deps): update module github.com/stackitcloud/stackit-sdk-go/services/ske to v0.16.0 * Rename data type --------- Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com> Co-authored-by: vicentepinto98 <vicente.pinto@freiheit.com>
This commit is contained in:
parent
ba7bf10db7
commit
6af9c0dcbb
4 changed files with 11 additions and 11 deletions
|
|
@ -1207,7 +1207,7 @@ func toMaintenancePayload(ctx context.Context, m *Model) (*ske.Maintenance, erro
|
|||
}, nil
|
||||
}
|
||||
|
||||
func toNetworkPayload(ctx context.Context, m *Model) (*ske.V1Network, error) {
|
||||
func toNetworkPayload(ctx context.Context, m *Model) (*ske.Network, error) {
|
||||
if m.Network.IsNull() || m.Network.IsUnknown() {
|
||||
return nil, nil
|
||||
}
|
||||
|
|
@ -1218,7 +1218,7 @@ func toNetworkPayload(ctx context.Context, m *Model) (*ske.V1Network, error) {
|
|||
return nil, fmt.Errorf("converting network object: %v", diags.Errors())
|
||||
}
|
||||
|
||||
return &ske.V1Network{
|
||||
return &ske.Network{
|
||||
Id: conversion.StringValueToPointer(network.ID),
|
||||
}, nil
|
||||
}
|
||||
|
|
@ -1489,7 +1489,7 @@ func mapNetwork(cl *ske.Cluster, m *Model) error {
|
|||
// If the network field is not provided, the SKE API returns an empty object.
|
||||
// If we parse that object into the terraform model, it will produce an inconsistent result after apply error
|
||||
|
||||
emptyNetwork := &ske.V1Network{}
|
||||
emptyNetwork := &ske.Network{}
|
||||
if *cl.Network == *emptyNetwork && m.Network.IsNull() {
|
||||
if m.Network.Attributes() == nil {
|
||||
m.Network = types.ObjectNull(networkTypes)
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ func TestMapFields(t *testing.T) {
|
|||
End: utils.Ptr("0010-11-12T13:14:15Z"),
|
||||
},
|
||||
},
|
||||
Network: &ske.V1Network{
|
||||
Network: &ske.Network{
|
||||
Id: utils.Ptr("nid"),
|
||||
},
|
||||
Name: utils.Ptr("name"),
|
||||
|
|
@ -235,7 +235,7 @@ func TestMapFields(t *testing.T) {
|
|||
types.ObjectNull(extensionsTypes),
|
||||
&ske.Cluster{
|
||||
Name: utils.Ptr("name"),
|
||||
Network: &ske.V1Network{},
|
||||
Network: &ske.Network{},
|
||||
},
|
||||
Model{
|
||||
Id: types.StringValue("pid,name"),
|
||||
|
|
@ -1970,7 +1970,7 @@ func TestToNetworkPayload(t *testing.T) {
|
|||
tests := []struct {
|
||||
description string
|
||||
model *Model
|
||||
expected *ske.V1Network
|
||||
expected *ske.Network
|
||||
isValid bool
|
||||
}{
|
||||
{
|
||||
|
|
@ -1982,7 +1982,7 @@ func TestToNetworkPayload(t *testing.T) {
|
|||
"id": types.StringValue("nid"),
|
||||
}),
|
||||
},
|
||||
&ske.V1Network{
|
||||
&ske.Network{
|
||||
Id: utils.Ptr("nid"),
|
||||
},
|
||||
true,
|
||||
|
|
@ -1996,7 +1996,7 @@ func TestToNetworkPayload(t *testing.T) {
|
|||
"id": types.StringNull(),
|
||||
}),
|
||||
},
|
||||
&ske.V1Network{},
|
||||
&ske.Network{},
|
||||
true,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue