From 7fe135f3371608662a72b9bec82ce18ac6d7d525 Mon Sep 17 00:00:00 2001 From: "Marcel S. Henselin" Date: Thu, 29 Jan 2026 16:22:18 +0000 Subject: [PATCH] fix: refactor publish command (#11) ## 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/11 Co-authored-by: Marcel S. Henselin Co-committed-by: Marcel S. Henselin --- cmd/cmd/publishCmd.go | 8 +++++-- .../postgresflexalpha_instance.md | 24 +++++++++++++++++++ docs/resources/postgresflexalpha_instance.md | 10 ++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/cmd/cmd/publishCmd.go b/cmd/cmd/publishCmd.go index 05e9106f..e47e3e29 100644 --- a/cmd/cmd/publishCmd.go +++ b/cmd/cmd/publishCmd.go @@ -293,8 +293,11 @@ func createTargetDirs(destPath string) error { if err != nil { return err } + err = createDir(path.Join(destPath, v)) + if err != nil { + return err + } } - return nil } @@ -405,7 +408,8 @@ func createArchitectureFiles(namespace, provider, distPath, repoName, version, g { "protocols": [ "4.0", - "5.1" + "5.1", + "6.0" ], "os": "%s", "arch": "%s", diff --git a/docs/data-sources/postgresflexalpha_instance.md b/docs/data-sources/postgresflexalpha_instance.md index b7756a9b..b254eb7d 100644 --- a/docs/data-sources/postgresflexalpha_instance.md +++ b/docs/data-sources/postgresflexalpha_instance.md @@ -31,6 +31,10 @@ data "stackitprivatepreview_postgresflexalpha_instance" "example" { ### Read-Only - `backup_schedule` (String) The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule. +- `connection_info` (Attributes) The DNS name and port in the instance overview (see [below for nested schema](#nestedatt--connection_info)) +- `encryption` (Attributes) The configuration for instance's volume and backup storage encryption. + +⚠️ **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. (see [below for nested schema](#nestedatt--encryption)) - `flavor_id` (String) The id of the instance flavor. - `id` (String) The ID of the instance. - `is_deletable` (Boolean) Whether the instance can be deleted or not. @@ -42,6 +46,26 @@ data "stackitprivatepreview_postgresflexalpha_instance" "example" { - `storage` (Attributes) The object containing information about the storage size and class. (see [below for nested schema](#nestedatt--storage)) - `version` (String) The Postgres version used for the instance. See [Versions Endpoint](/documentation/postgres-flex-service/version/v3alpha1#tag/Version) for supported version parameters. + +### Nested Schema for `connection_info` + +Read-Only: + +- `host` (String) The host of the instance. +- `port` (Number) The port of the instance. + + + +### Nested Schema for `encryption` + +Read-Only: + +- `kek_key_id` (String) The encryption-key key identifier +- `kek_key_ring_id` (String) The encryption-key keyring identifier +- `kek_key_version` (String) The encryption-key version +- `service_account` (String) + + ### Nested Schema for `network` diff --git a/docs/resources/postgresflexalpha_instance.md b/docs/resources/postgresflexalpha_instance.md index af2d0d7b..3dc7ef51 100644 --- a/docs/resources/postgresflexalpha_instance.md +++ b/docs/resources/postgresflexalpha_instance.md @@ -62,6 +62,7 @@ import { ### Read-Only +- `connection_info` (Attributes) The DNS name and port in the instance overview (see [below for nested schema](#nestedatt--connection_info)) - `id` (String) The ID of the instance. - `is_deletable` (Boolean) Whether the instance can be deleted or not. - `status` (String) The current status of the instance. @@ -98,3 +99,12 @@ Required: - `kek_key_ring_id` (String) The encryption-key keyring identifier - `kek_key_version` (String) The encryption-key version - `service_account` (String) + + + +### Nested Schema for `connection_info` + +Read-Only: + +- `host` (String) The host of the instance. +- `port` (Number) The port of the instance.