Improve region details (#90)
* Make client config error message more clear * Add missing log * Add region detail to resource/data source description * Generate docs * Remove resourcemanager using region * Apply changes to MongoDBFlex user * Generate docs * Fix wrong description --------- Co-authored-by: Henrique Santos <henrique.santos@freiheit.com>
This commit is contained in:
parent
20f3496242
commit
9d11098102
102 changed files with 200 additions and 193 deletions
|
|
@ -65,7 +65,7 @@ func (r *instanceDataSource) Configure(ctx context.Context, req datasource.Confi
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
core.LogAndAddError(ctx, &resp.Diagnostics, "Error configuring API client", fmt.Sprintf("Configuring client: %v", err))
|
||||
core.LogAndAddError(ctx, &resp.Diagnostics, "Error configuring API client", fmt.Sprintf("Configuring client: %v. This is an error related to the provider configuration, not to the data source configuration", err))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ func (r *instanceDataSource) Configure(ctx context.Context, req datasource.Confi
|
|||
// Schema defines the schema for the data source.
|
||||
func (r *instanceDataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse) {
|
||||
descriptions := map[string]string{
|
||||
"main": "PostgresFlex instance data source schema.",
|
||||
"main": "PostgresFlex instance data source schema. Must have a `region` specified in the provider configuration.",
|
||||
"id": "Terraform's internal data source. ID. It is structured as \"`project_id`,`instance_id`\".",
|
||||
"instance_id": "ID of the PostgresFlex instance.",
|
||||
"project_id": "STACKIT project ID to which the instance is associated.",
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ func (r *instanceResource) Configure(ctx context.Context, req resource.Configure
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
core.LogAndAddError(ctx, &resp.Diagnostics, "Error configuring API client", fmt.Sprintf("Configuring client: %v", err))
|
||||
core.LogAndAddError(ctx, &resp.Diagnostics, "Error configuring API client", fmt.Sprintf("Configuring client: %v. This is an error related to the provider configuration, not to the resource configuration", err))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ func (r *instanceResource) Configure(ctx context.Context, req resource.Configure
|
|||
// Schema defines the schema for the resource.
|
||||
func (r *instanceResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse) {
|
||||
descriptions := map[string]string{
|
||||
"main": "PostgresFlex instance resource schema.",
|
||||
"main": "PostgresFlex instance resource schema. Must have a `region` specified in the provider configuration.",
|
||||
"id": "Terraform's internal resource ID. It is structured as \"`project_id`,`instance_id`\".",
|
||||
"instance_id": "ID of the PostgresFlex instance.",
|
||||
"project_id": "STACKIT project ID to which the instance is associated.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue