-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fixes timeout and removes deletion logic on update failure for mongodbatlas_search_index resource #1950
Conversation
mongodbatlas_search_index
resource
mongodbatlas_search_index
resourced.SetId("") | ||
return diag.FromErr(fmt.Errorf("error creating index in cluster (%s): %s", clusterName, err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we don't delete it, should we keep the id and don't set it to "" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch! fixed
resourceDelete(ctx, d, meta) | ||
d.SetId("") | ||
return diag.FromErr(fmt.Errorf("error creating index in cluster (%s): %s", clusterName, err)) | ||
return diag.FromErr(fmt.Errorf("error updating index in cluster (%s). mongodbatlas_search_index resource was not deleted : %s", clusterName, err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why do we need to specify the resource was not deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mostly for users who might be expecting the previous incorrect behavior of the index being deleted in case of errors/timeouts, see comment
Description
mongodbatlas_search_index
resource currently triggers deletion if update times out/fails. This PR aims to:Link to any related issue(s): https://jira.mongodb.org/browse/CLOUDP-229877
Type of change:
Required Checklist:
Further comments
New error message upon UPDATE failure: