From 615f88579bea8a49b5b23c5414a13221d4c4e664 Mon Sep 17 00:00:00 2001 From: Andre Harms Date: Wed, 4 Feb 2026 08:39:49 +0100 Subject: [PATCH] feat: add database resource schema for PostgreSQL flex alpha --- .../datasources_gen/database_data_source_gen.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stackit/internal/services/postgresflexalpha/database/datasources_gen/database_data_source_gen.go b/stackit/internal/services/postgresflexalpha/database/datasources_gen/database_data_source_gen.go index d5683a6c..a890b593 100644 --- a/stackit/internal/services/postgresflexalpha/database/datasources_gen/database_data_source_gen.go +++ b/stackit/internal/services/postgresflexalpha/database/datasources_gen/database_data_source_gen.go @@ -4,7 +4,9 @@ package postgresflexalpha import ( "context" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" "github.com/hashicorp/terraform-plugin-framework/schema/validator" "github.com/hashicorp/terraform-plugin-framework/types" @@ -31,14 +33,21 @@ func DatabaseDataSourceSchema(ctx context.Context) schema.Schema { }, "name": schema.StringAttribute{ Computed: true, + Optional: true, Description: "The name of the database.", MarkdownDescription: "The name of the database.", }, "owner": schema.StringAttribute{ + Optional: true, Computed: true, Description: "The owner of the database.", MarkdownDescription: "The owner of the database.", }, + "instance_id": schema.StringAttribute{ + Required: true, + Description: "The ID of the instance.", + MarkdownDescription: "The ID of the instance.", + }, "project_id": schema.StringAttribute{ Required: true, Description: "The STACKIT project ID.", @@ -64,6 +73,7 @@ type DatabaseModel struct { InstanceId types.String `tfsdk:"instance_id"` Name types.String `tfsdk:"name"` Owner types.String `tfsdk:"owner"` + InstanceId types.String `tfsdk:"instance_id"` ProjectId types.String `tfsdk:"project_id"` Region types.String `tfsdk:"region"` }