From f3d66c75692738dd9e8057533220414e75fd0f7b Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Fri, 30 Jan 2026 10:37:50 +0000 Subject: [PATCH] fix: refactor postgres genereated files (#15) ## Description relates to #1234 ## Checklist - [ ] Issue was linked above - [ ] Code format was applied: `make fmt` - [ ] Examples were added / adjusted (see `examples/` directory) - [x] Docs are up-to-date: `make generate-docs` (will be checked by CI) - [ ] Unit tests got implemented or updated - [ ] Acceptance tests got implemented or updated (see e.g. [here](https://github.com/stackitcloud/terraform-provider-stackit/blob/f5f99d170996b208672ae684b6da53420e369563/stackit/internal/services/dns/dns_acc_test.go)) - [x] Unit tests are passing: `make test` (will be checked by CI) - [x] No linter issues: `make lint` (will be checked by CI) Reviewed-on: https://tf-provider.git.onstackit.cloud/stackit-dev-tools/terraform-provider-stackitprivatepreview/pulls/15 Co-authored-by: Marcel S. Henselin Co-committed-by: Marcel S. Henselin --- .../datasources_gen/instance_data_source_gen.go | 11 +++++++++-- .../instance/resources_gen/instance_resource_gen.go | 13 +++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/stackit/internal/services/postgresflexalpha/instance/datasources_gen/instance_data_source_gen.go b/stackit/internal/services/postgresflexalpha/instance/datasources_gen/instance_data_source_gen.go index 3156dccc..5ff386fe 100644 --- a/stackit/internal/services/postgresflexalpha/instance/datasources_gen/instance_data_source_gen.go +++ b/stackit/internal/services/postgresflexalpha/instance/datasources_gen/instance_data_source_gen.go @@ -20,6 +20,12 @@ import ( func InstanceDataSourceSchema(ctx context.Context) schema.Schema { return schema.Schema{ Attributes: map[string]schema.Attribute{ + "acl": schema.ListAttribute{ + ElementType: types.StringType, + Computed: true, + Description: "List of IPV4 cidr.", + MarkdownDescription: "List of IPV4 cidr.", + }, "backup_schedule": schema.StringAttribute{ Computed: true, Description: "The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.", @@ -74,8 +80,8 @@ func InstanceDataSourceSchema(ctx context.Context) schema.Schema { }, }, Computed: true, - Description: "The configuration for instance's volume and backup storage encryption.\n\n⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.\n", - MarkdownDescription: "The configuration for instance's volume and backup storage encryption.\n\n⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.\n", + Description: "The configuration for instance's volume and backup storage encryption.\n\n⚠\ufe1d **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.\n", + MarkdownDescription: "The configuration for instance's volume and backup storage encryption.\n\n⚠\ufe1d **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.\n", }, "flavor_id": schema.StringAttribute{ Computed: true, @@ -193,6 +199,7 @@ func InstanceDataSourceSchema(ctx context.Context) schema.Schema { } type InstanceModel struct { + Acl types.List `tfsdk:"acl"` BackupSchedule types.String `tfsdk:"backup_schedule"` ConnectionInfo ConnectionInfoValue `tfsdk:"connection_info"` Encryption EncryptionValue `tfsdk:"encryption"` diff --git a/stackit/internal/services/postgresflexalpha/instance/resources_gen/instance_resource_gen.go b/stackit/internal/services/postgresflexalpha/instance/resources_gen/instance_resource_gen.go index 3d3f9459..35d31cbc 100644 --- a/stackit/internal/services/postgresflexalpha/instance/resources_gen/instance_resource_gen.go +++ b/stackit/internal/services/postgresflexalpha/instance/resources_gen/instance_resource_gen.go @@ -22,6 +22,12 @@ import ( func InstanceResourceSchema(ctx context.Context) schema.Schema { return schema.Schema{ Attributes: map[string]schema.Attribute{ + "acl": schema.ListAttribute{ + ElementType: types.StringType, + Computed: true, + Description: "List of IPV4 cidr.", + MarkdownDescription: "List of IPV4 cidr.", + }, "backup_schedule": schema.StringAttribute{ Required: true, Description: "The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.", @@ -77,8 +83,8 @@ func InstanceResourceSchema(ctx context.Context) schema.Schema { }, Optional: true, Computed: true, - Description: "The configuration for instance's volume and backup storage encryption.\n\n⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.\n", - MarkdownDescription: "The configuration for instance's volume and backup storage encryption.\n\n⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.\n", + Description: "The configuration for instance's volume and backup storage encryption.\n\n⚠\ufe1d **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.\n", + MarkdownDescription: "The configuration for instance's volume and backup storage encryption.\n\n⚠\ufe1d **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.\n", }, "flavor_id": schema.StringAttribute{ Required: true, @@ -128,11 +134,9 @@ func InstanceResourceSchema(ctx context.Context) schema.Schema { MarkdownDescription: "List of IPV4 cidr.", }, "instance_address": schema.StringAttribute{ - Optional: true, Computed: true, }, "router_address": schema.StringAttribute{ - Optional: true, Computed: true, }, }, @@ -215,6 +219,7 @@ func InstanceResourceSchema(ctx context.Context) schema.Schema { } type InstanceModel struct { + Acl types.List `tfsdk:"acl"` BackupSchedule types.String `tfsdk:"backup_schedule"` ConnectionInfo ConnectionInfoValue `tfsdk:"connection_info"` Encryption EncryptionValue `tfsdk:"encryption"`