From bece1cc900e9b0f88c019f8c636c54f4e3626002 Mon Sep 17 00:00:00 2001 From: Omar Ibrahim <97538078+omaraibrahim@users.noreply.github.com> Date: Thu, 8 Aug 2024 11:52:02 -0400 Subject: [PATCH] Update(Cloud-Databases): Added hints for region and location mismatches (#5557) --- ibm/service/database/data_source_ibm_database.go | 2 +- ibm/service/database/resource_ibm_database.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ibm/service/database/data_source_ibm_database.go b/ibm/service/database/data_source_ibm_database.go index 0ef0cfcf32..4b5462fdd3 100644 --- a/ibm/service/database/data_source_ibm_database.go +++ b/ibm/service/database/data_source_ibm_database.go @@ -685,7 +685,7 @@ func dataSourceIBMDatabaseInstanceRead(d *schema.ResourceData, meta interface{}) autoscalingGroup, _, err := cloudDatabasesClient.GetAutoscalingConditions(getAutoscalingConditionsOptions) if err != nil { - return fmt.Errorf("[ERROR] Error getting database autoscaling groups: %s", err) + return fmt.Errorf("[ERROR] Error getting database autoscaling groups: %s\n Hint: Check if there is a mismatch between your database location and IBMCLOUD_REGION", err) } d.Set("auto_scaling", flattenAutoScalingGroup(*autoscalingGroup)) diff --git a/ibm/service/database/resource_ibm_database.go b/ibm/service/database/resource_ibm_database.go index d7e683c7c2..74f3dbca3b 100644 --- a/ibm/service/database/resource_ibm_database.go +++ b/ibm/service/database/resource_ibm_database.go @@ -1754,7 +1754,7 @@ func resourceIBMDatabaseInstanceRead(context context.Context, d *schema.Resource autoscalingGroup, _, err := cloudDatabasesClient.GetAutoscalingConditions(getAutoscalingConditionsOptions) if err != nil { - return diag.FromErr(fmt.Errorf("[ERROR] Error getting database autoscaling groups: %s", err)) + return diag.FromErr(fmt.Errorf("[ERROR] Error getting database autoscaling groups: %s\n Hint: Check if there is a mismatch between your database location and IBMCLOUD_REGION", err)) } d.Set("auto_scaling", flattenAutoScalingGroup(*autoscalingGroup))