Skip to content
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

Tolerate 404 errors on delete #2589

Closed
wants to merge 3 commits into from

Conversation

JaylonmcShan03
Copy link
Contributor

Description

Fixes #2188
This PR introduces changes to handle "404 Not Found" errors during the deletion of Kubernetes resources, particularly in cases where the resource may already have been deleted by a CRD or another process before Terraform attempts to delete it.

Changes Introduced:

  • Added logic to check for IsNotFound(err) when calling Delete on resources.

    • If a "404 Not Found" error is encountered, it is now treated as a successful deletion and logged as "Resource 
      already  deleted, ignoring 404 error".
      
    • Other errors during deletion will continue to be handled as before.

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

Release Note

Release note for CHANGELOG:

...

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

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

Successfully merging this pull request may close these issues.

An option ignore deletion of a resource
1 participant