Update SDK dependencies (#100)
* Update dependencies * Fix tests * Fix field assignment * Update field assignment * Remove unused functions --------- Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
parent
9937717104
commit
c3618f2b63
35 changed files with 249 additions and 224 deletions
|
|
@ -9,7 +9,6 @@ import (
|
|||
"github.com/hashicorp/terraform-plugin-framework/datasource"
|
||||
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
|
||||
"github.com/hashicorp/terraform-plugin-log/tflog"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
|
||||
|
||||
|
|
@ -222,6 +221,6 @@ func mapDataSourceFields(userResp *postgresflex.UserResponse, model *DataSourceM
|
|||
model.Roles = rolesSet
|
||||
}
|
||||
model.Host = types.StringPointerValue(user.Host)
|
||||
model.Port = conversion.ToTypeInt64(user.Port)
|
||||
model.Port = types.Int64PointerValue(user.Port)
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ func TestMapDataSourceFields(t *testing.T) {
|
|||
},
|
||||
Username: utils.Ptr("username"),
|
||||
Host: utils.Ptr("host"),
|
||||
Port: utils.Ptr(int32(1234)),
|
||||
Port: utils.Ptr(int64(1234)),
|
||||
},
|
||||
},
|
||||
DataSourceModel{
|
||||
|
|
@ -72,7 +72,7 @@ func TestMapDataSourceFields(t *testing.T) {
|
|||
Roles: &[]string{},
|
||||
Username: nil,
|
||||
Host: nil,
|
||||
Port: utils.Ptr(int32(2123456789)),
|
||||
Port: utils.Ptr(int64(2123456789)),
|
||||
},
|
||||
},
|
||||
DataSourceModel{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import (
|
|||
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
|
||||
"github.com/hashicorp/terraform-plugin-framework/schema/validator"
|
||||
"github.com/hashicorp/terraform-plugin-log/tflog"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/core"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/validate"
|
||||
|
||||
|
|
@ -377,7 +376,7 @@ func mapFieldsCreate(userResp *postgresflex.CreateUserResponse, model *Model) er
|
|||
model.Roles = rolesSet
|
||||
}
|
||||
model.Host = types.StringPointerValue(user.Host)
|
||||
model.Port = conversion.ToTypeInt64(user.Port)
|
||||
model.Port = types.Int64PointerValue(user.Port)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
@ -423,7 +422,7 @@ func mapFields(userResp *postgresflex.UserResponse, model *Model) error {
|
|||
model.Roles = rolesSet
|
||||
}
|
||||
model.Host = types.StringPointerValue(user.Host)
|
||||
model.Port = conversion.ToTypeInt64(user.Port)
|
||||
model.Port = types.Int64PointerValue(user.Port)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ func TestMapFieldsCreate(t *testing.T) {
|
|||
Username: utils.Ptr("username"),
|
||||
Password: utils.Ptr("password"),
|
||||
Host: utils.Ptr("host"),
|
||||
Port: utils.Ptr(int32(1234)),
|
||||
Port: utils.Ptr(int64(1234)),
|
||||
},
|
||||
},
|
||||
Model{
|
||||
|
|
@ -80,7 +80,7 @@ func TestMapFieldsCreate(t *testing.T) {
|
|||
Username: nil,
|
||||
Password: utils.Ptr(""),
|
||||
Host: nil,
|
||||
Port: utils.Ptr(int32(2123456789)),
|
||||
Port: utils.Ptr(int64(2123456789)),
|
||||
},
|
||||
},
|
||||
Model{
|
||||
|
|
@ -185,7 +185,7 @@ func TestMapFields(t *testing.T) {
|
|||
},
|
||||
Username: utils.Ptr("username"),
|
||||
Host: utils.Ptr("host"),
|
||||
Port: utils.Ptr(int32(1234)),
|
||||
Port: utils.Ptr(int64(1234)),
|
||||
},
|
||||
},
|
||||
Model{
|
||||
|
|
@ -212,7 +212,7 @@ func TestMapFields(t *testing.T) {
|
|||
Roles: &[]string{},
|
||||
Username: nil,
|
||||
Host: nil,
|
||||
Port: utils.Ptr(int32(2123456789)),
|
||||
Port: utils.Ptr(int64(2123456789)),
|
||||
},
|
||||
},
|
||||
Model{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue