If the mongodbatlas_project_ip_access_list resource is deleted from the UI after creation, the provider should plan to recreate it and remove it from the state. Currently, this doesn't happen because when calling resp.State.RemoveResource(ctx) in the provider in Read(), we add an error to the response diagnostic, interfering with resource removal.
As a result, users only see a 404 error and must manually remove the resource from the state.
This PR removes the error diagnostic to ensure resp.State.RemoveResource(ctx) functions correctly.
[X] Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
[ ] New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
[ ] I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
[ ] I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
[ ] I have added any necessary documentation (if appropriate)
[ ] I have run make fmt and formatted my code
[ ] If changes include deprecations or removals, I defined an isolated PR with a relevant title as it will be used in the auto-generated changelog.
[ ] If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.
Description
If the
mongodbatlas_project_ip_access_list
resource is deleted from the UI after creation, the provider should plan to recreate it and remove it from the state. Currently, this doesn't happen because when calling resp.State.RemoveResource(ctx) in the provider inRead(
), we add an error to the response diagnostic, interfering with resource removal. As a result, users only see a 404 error and must manually remove the resource from the state. This PR removes the error diagnostic to ensureresp.State.RemoveResource(ctx)
functions correctly.Link to any related issue(s): https://github.com/mongodb/terraform-provider-mongodbatlas/issues/2343
Type of change:
Required Checklist:
Further comments