diff --git a/internal/service/x509authenticationdatabaseuser/resource_x509_authentication_database_user.go b/internal/service/x509authenticationdatabaseuser/resource_x509_authentication_database_user.go index d574328a23..7ba3c51820 100644 --- a/internal/service/x509authenticationdatabaseuser/resource_x509_authentication_database_user.go +++ b/internal/service/x509authenticationdatabaseuser/resource_x509_authentication_database_user.go @@ -176,21 +176,9 @@ func resourceMongoDBAtlasX509AuthDBUserRead(ctx context.Context, d *schema.Resou } func resourceMongoDBAtlasX509AuthDBUserDelete(ctx context.Context, d *schema.ResourceData, meta any) diag.Diagnostics { - conn := meta.(*config.MongoDBClient).Atlas - - ids := conversion.DecodeStateID(d.Id()) - currentCertificate := ids["current_certificate"] - projectID := ids["project_id"] - - if currentCertificate == "" { - _, err := conn.X509AuthDBUsers.DisableCustomerX509(ctx, projectID) - if err != nil { - return diag.FromErr(fmt.Errorf(errorCustomerX509AuthDBUsersDelete, projectID, err)) - } - } - + // We don't do anything because X.509 certificates can not be deleted or disassociated from a user. + // More info: https://jira.mongodb.org/browse/HELP-53363 d.SetId("") - return nil } diff --git a/website/docs/r/x509_authentication_database_user.html.markdown b/website/docs/r/x509_authentication_database_user.html.markdown index 4973936c1e..d3024e9724 100644 --- a/website/docs/r/x509_authentication_database_user.html.markdown +++ b/website/docs/r/x509_authentication_database_user.html.markdown @@ -17,6 +17,8 @@ description: |- -> **NOTE:** Groups and projects are synonymous terms. You may find group_id in the official documentation. +-> **NOTE:** Before provider version 1.14.0, Self-managed X.509 Authentication was disabled for the project when this resource was deleted. Starting from that version onward, it will not be disabled, allowing other users to continue using X.509 within the same project. + ## Example Usages ### Example Usage: Generate an Atlas-managed X.509 certificate for a MongoDB user