diff --git a/docs/data-sources/redis_credential.md b/docs/data-sources/redis_credential.md index f3f4fe30..df29d3e8 100644 --- a/docs/data-sources/redis_credential.md +++ b/docs/data-sources/redis_credential.md @@ -38,5 +38,5 @@ data "stackit_redis_credential" "example" { - `name` (String) - `password` (String, Sensitive) - `port` (Number) -- `uri` (String) +- `uri` (String) Connection URI. Currently the returned uri doesn't support SSL, but you can enable it by using `rediss://` instead of `redis://`. We will provide the SSL connection in a future release - `username` (String) diff --git a/docs/resources/redis_credential.md b/docs/resources/redis_credential.md index abd68dcb..72221130 100644 --- a/docs/resources/redis_credential.md +++ b/docs/resources/redis_credential.md @@ -37,5 +37,5 @@ resource "stackit_redis_credential" "example" { - `name` (String) - `password` (String, Sensitive) - `port` (Number) -- `uri` (String) +- `uri` (String) Connection URI. Currently the returned uri doesn't support SSL, but you can enable it by using `rediss://` instead of `redis://`. We will provide the SSL connection in a future release - `username` (String) diff --git a/docs/resources/ske_project.md b/docs/resources/ske_project.md index 3a5df14b..b73121f0 100644 --- a/docs/resources/ske_project.md +++ b/docs/resources/ske_project.md @@ -3,12 +3,12 @@ page_title: "stackit_ske_project Resource - stackit" subcategory: "" description: |- - SKE project resource schema. Must have a region specified in the provider configuration. + SKE project resource schema. Must have a region specified in the provider configuration. This resource allows you to enable the SKE service and you can only have one per project. Deleting this resource will destroy any SKE clusters associated to the project --- # stackit_ske_project (Resource) -SKE project resource schema. Must have a `region` specified in the provider configuration. +SKE project resource schema. Must have a `region` specified in the provider configuration. This resource allows you to enable the SKE service and you can only have one per project. Deleting this resource will destroy any SKE clusters associated to the project ## Example Usage diff --git a/stackit/internal/services/redis/credential/datasource.go b/stackit/internal/services/redis/credential/datasource.go index d28a5ad8..c27dc739 100644 --- a/stackit/internal/services/redis/credential/datasource.go +++ b/stackit/internal/services/redis/credential/datasource.go @@ -80,6 +80,7 @@ func (r *credentialDataSource) Schema(_ context.Context, _ datasource.SchemaRequ "credential_id": "The credential's ID.", "instance_id": "ID of the Redis instance.", "project_id": "STACKIT project ID to which the instance is associated.", + "uri": "Connection URI. Currently the returned uri doesn't support SSL, but you can enable it by using `rediss://` instead of `redis://`. We will provide the SSL connection in a future release", } resp.Schema = schema.Schema{ @@ -134,7 +135,8 @@ func (r *credentialDataSource) Schema(_ context.Context, _ datasource.SchemaRequ Computed: true, }, "uri": schema.StringAttribute{ - Computed: true, + Description: descriptions["uri"], + Computed: true, }, "username": schema.StringAttribute{ Computed: true, diff --git a/stackit/internal/services/redis/credential/resource.go b/stackit/internal/services/redis/credential/resource.go index 643107b0..1aa4cc94 100644 --- a/stackit/internal/services/redis/credential/resource.go +++ b/stackit/internal/services/redis/credential/resource.go @@ -103,6 +103,7 @@ func (r *credentialResource) Schema(_ context.Context, _ resource.SchemaRequest, "credential_id": "The credential's ID.", "instance_id": "ID of the Redis instance.", "project_id": "STACKIT Project ID to which the instance is associated.", + "uri": "Connection URI. Currently the returned uri doesn't support SSL, but you can enable it by using `rediss://` instead of `redis://`. We will provide the SSL connection in a future release", } resp.Schema = schema.Schema{ @@ -171,7 +172,8 @@ func (r *credentialResource) Schema(_ context.Context, _ resource.SchemaRequest, Computed: true, }, "uri": schema.StringAttribute{ - Computed: true, + Description: descriptions["uri"], + Computed: true, }, "username": schema.StringAttribute{ Computed: true, diff --git a/stackit/internal/services/ske/project/resource.go b/stackit/internal/services/ske/project/resource.go index 87631953..87fdfa47 100644 --- a/stackit/internal/services/ske/project/resource.go +++ b/stackit/internal/services/ske/project/resource.go @@ -86,7 +86,7 @@ func (r *projectResource) Configure(ctx context.Context, req resource.ConfigureR // Schema returns the Terraform schema structure func (r *projectResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) { resp.Schema = schema.Schema{ - Description: "SKE project resource schema. Must have a `region` specified in the provider configuration.", + Description: "SKE project resource schema. Must have a `region` specified in the provider configuration. This resource allows you to enable the SKE service and you can only have one per project. Deleting this resource will destroy any SKE clusters associated to the project", Attributes: map[string]schema.Attribute{ "id": schema.StringAttribute{ Description: "Terraform's internal resource ID. It is structured as \"`project_id`\".", @@ -171,6 +171,8 @@ func (r *projectResource) Update(ctx context.Context, _ resource.UpdateRequest, // Delete deletes the resource and removes the Terraform state on success. func (r *projectResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) { // nolint:gocritic // function signature required by Terraform + core.LogAndAddWarning(ctx, &resp.Diagnostics, "Deleting project", "Deleting this resource will destroy any existing clusters under the project") + var model Model resp.Diagnostics.Append(req.State.Get(ctx, &model)...) if resp.Diagnostics.HasError() { @@ -182,12 +184,12 @@ func (r *projectResource) Delete(ctx context.Context, req resource.DeleteRequest c := r.client _, err := c.DisableService(ctx, projectId).Execute() if err != nil { - core.LogAndAddError(ctx, &resp.Diagnostics, "Error deleting credential", fmt.Sprintf("Calling API: %v", err)) + core.LogAndAddError(ctx, &resp.Diagnostics, "Error deleting project", fmt.Sprintf("Calling API: %v", err)) return } _, err = wait.DisableServiceWaitHandler(ctx, r.client, projectId).WaitWithContext(ctx) if err != nil { - core.LogAndAddError(ctx, &resp.Diagnostics, "Error deleting credential", fmt.Sprintf("Project deletion waiting: %v", err)) + core.LogAndAddError(ctx, &resp.Diagnostics, "Error deleting project", fmt.Sprintf("Project deletion waiting: %v", err)) return } tflog.Info(ctx, "SKE project deleted")