From ad221b9bc01574413e7112d973f40a50eda3e097 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 7 May 2026 08:50:51 +0200 Subject: [PATCH 1/2] fix: wrong flavor source --- .../internal/services/postgresflexalpha/flavor/datasource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stackit/internal/services/postgresflexalpha/flavor/datasource.go b/stackit/internal/services/postgresflexalpha/flavor/datasource.go index 97213227..715c68ed 100644 --- a/stackit/internal/services/postgresflexalpha/flavor/datasource.go +++ b/stackit/internal/services/postgresflexalpha/flavor/datasource.go @@ -11,7 +11,7 @@ import ( "github.com/stackitcloud/stackit-sdk-go/services/postgresflex/v3alpha1api" "tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/conversion" - postgresflexalphaGen "tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha/flavors/datasources_gen" + postgresflexalphaGen "tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha/flavor/datasources_gen" postgresflexUtils "tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/services/postgresflexalpha/utils" "tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/stackit/internal/utils" -- 2.49.1 From 01f91fb613be2f6274c598d2786b2cf25737f099 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 7 May 2026 09:12:54 +0200 Subject: [PATCH 2/2] fix: wrong flavor data type --- .../postgresflexalpha/flavor/datasource.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/stackit/internal/services/postgresflexalpha/flavor/datasource.go b/stackit/internal/services/postgresflexalpha/flavor/datasource.go index 715c68ed..ee7177f6 100644 --- a/stackit/internal/services/postgresflexalpha/flavor/datasource.go +++ b/stackit/internal/services/postgresflexalpha/flavor/datasource.go @@ -220,14 +220,24 @@ func (r *flavorDataSource) Read(ctx context.Context, req datasource.ReadRequest, } else { var scList []attr.Value for _, sc := range f.StorageClasses { + mIop := types.Int32Null() + if val, ok := sc.GetMaxIoPerSecOk(); ok { + mIop = types.Int32Value(*val) + } + + mThrough := types.Int32Null() + if val, ok := sc.GetMaxThroughInMbOk(); ok { + mThrough = types.Int32Value(*val) + } + scList = append( scList, postgresflexalphaGen.NewStorageClassesValueMust( postgresflexalphaGen.StorageClassesValue{}.AttributeTypes(ctx), map[string]attr.Value{ "class": types.StringValue(sc.Class), - "max_io_per_sec": types.Int64Value(int64(sc.GetMaxIoPerSec())), - "max_through_in_mb": types.Int64Value(int64(sc.GetMaxThroughInMb())), + "max_io_per_sec": mIop, + "max_through_in_mb": mThrough, }, ), ) -- 2.49.1