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

Tags are not cleaned up from the terraform state after being deleted externally #655

Closed
drastawi opened this issue Mar 15, 2023 · 0 comments · Fixed by #670
Closed

Tags are not cleaned up from the terraform state after being deleted externally #655

drastawi opened this issue Mar 15, 2023 · 0 comments · Fixed by #670

Comments

@drastawi
Copy link
Contributor

Most resources handle resources deleted manually or by another terraform project with

errResp := handleNotFoundError(err, d)

for example:

errResp := handleNotFoundError(err, d)

This handling is missing in the tag resource

Terraform Version

2.11.2

Affected Resource(s)

resourcePagerDutyTag

Terraform Configuration Files

Debug Output

The tag X cannot be found - 404

Expected Behavior

The not-found resource should be deleted from the state and a new tag should be created.

Actual Behavior

The user was removed from the state as expected but the terraform plan still crashed as the tag could not be found.

Steps to Reproduce

  1. Create a user and a tag with terraform.
  2. Delete the user manually
  3. Run terraform plan
@drastawi drastawi changed the title Tags remain in the state after deletion Tags are not cleaned up from the terraform state after being deleted externally Mar 15, 2023
imjaroiswebdev added a commit that referenced this issue Apr 5, 2023
…moved

Address #655 Tags are not cleaned up from State after removed externally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant