Skip to content

Treat missing Atlas database user as successful delete - #4705

Open
Hashim1999164 wants to merge 1 commit into
mongodb:masterfrom
Hashim1999164:fix/database-user-delete-not-found
Open

Hashim1999164 wants to merge 1 commit into
mongodb:masterfrom
Hashim1999164:fix/database-user-delete-not-found

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Sep 6, 2026

Copy link
Copy Markdown

Summary

When destroy calls Delete for mongodbatlas_database_user and Atlas returns 404 USER_NOT_FOUND, treat that as success so apply can finish. This matches Read behavior and sibling resources such as teamprojectassignment.

Closes #4656

Test plan

  1. Unit tests for the databaseuser package passed locally
  2. Reviewers can confirm Delete ignores StatusNotFound the same way as teamprojectassignment

When the user is already gone, Delete should succeed like Read does.

Fixes mongodb#4656
@Hashim1999164
Hashim1999164 requested a review from a team as a code owner September 6, 2026 12:28
@marcabreracast

Copy link
Copy Markdown
Collaborator

Hi @Hashim1999164,
Thank you for reaching out with this PR! As my colleague @AgustinBettati mentioned in the original issue, we're currently discussing a provider-wide convention approach as this inconsistency behaviour affects several resources.

I f we go with your proposed approach, following our Contributing Guidelines in regards to Merging a Pull Request, we will create a branch from this PR and cherry pick your contribution.

I will keep this PR open for now so I can inform you when there's any relevant updates regarding this topic. Thank you for your patience!

@marcabreracast marcabreracast added the not_stale Not stale issue or PR label Sep 8, 2026
@Hashim1999164

Copy link
Copy Markdown
Author

@marcabreracast yeah that makes sense if a bunch of resources do the same thing. no rush, cherry pick is fine whenever you land on the convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not_stale Not stale issue or PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: mongodbatlas_database_user Delete fails on USER_NOT_FOUND

2 participants