Feat/mssql alpha instance (#7)
* chore: add missing resources --------- Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
This commit is contained in:
parent
08afbcf574
commit
70db08f43f
8 changed files with 129 additions and 30 deletions
|
|
@ -89,6 +89,16 @@ func StringValueToPointer(s basetypes.StringValue) *string {
|
|||
return &value
|
||||
}
|
||||
|
||||
// Int32ValueToPointer converts basetypes.Int64Value to a pointer to int64.
|
||||
// It returns nil if the value is null or unknown.
|
||||
func Int32ValueToPointer(s basetypes.Int32Value) *int32 {
|
||||
if s.IsNull() || s.IsUnknown() {
|
||||
return nil
|
||||
}
|
||||
value := s.ValueInt32()
|
||||
return &value
|
||||
}
|
||||
|
||||
// Int64ValueToPointer converts basetypes.Int64Value to a pointer to int64.
|
||||
// It returns nil if the value is null or unknown.
|
||||
func Int64ValueToPointer(s basetypes.Int64Value) *int64 {
|
||||
|
|
|
|||
|
|
@ -723,9 +723,9 @@ func mapFields(ctx context.Context, resp *postgresflexalpha.GetInstanceResponse,
|
|||
// TODO
|
||||
//flavorValues = map[string]attr.Value{
|
||||
// "id": types.StringValue(*instance.FlavorId),
|
||||
// "description": types.StringValue(*instance.Flavor.Description),
|
||||
// "cpu": types.Int64PointerValue(instance.Flavor.Cpu),
|
||||
// "ram": types.Int64PointerValue(instance.Flavor.Memory),
|
||||
// "description": types.StringValue(*instance.FlavorId.Description),
|
||||
// "cpu": types.Int64PointerValue(instance.FlavorId.Cpu),
|
||||
// "ram": types.Int64PointerValue(instance.FlavorId.Memory),
|
||||
//}
|
||||
}
|
||||
flavorObject, diags := types.ObjectValue(flavorTypes, flavorValues)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"github.com/stackitcloud/terraform-provider-stackit/pkg/postgresflexalpha"
|
||||
"github.com/stackitcloud/terraform-provider-stackit/stackit/internal/conversion"
|
||||
postgresflexalphaUtils "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/postgresflexalpha/utils"
|
||||
postgresflexUtils "github.com/stackitcloud/terraform-provider-stackit/stackit/internal/services/postgresflexalpha/utils"
|
||||
|
||||
"github.com/hashicorp/terraform-plugin-framework/attr"
|
||||
"github.com/hashicorp/terraform-plugin-framework/datasource"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue