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

Error in Terraform operations after manual deletion of resources #5038

Open
hoiwingh opened this issue Jan 10, 2024 · 3 comments
Open

Error in Terraform operations after manual deletion of resources #5038

hoiwingh opened this issue Jan 10, 2024 · 3 comments

Comments

@hoiwingh
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

Affected Resource(s)

  • ibm_XXXXX

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please share a link to the ZIP file.

Debug Output

Panic Output

Expected Behavior

After a terraform deployed resource is manually deleted, subsequent operations (e.g. plan, destroy) should still succeed.

Actual Behavior

After a terraform deployed resource is manually deleted, subsequent operations (e.g. plan, destroy) failed.

We tried these operations via IBM Schematics, which got a 403 error.

Schematics team suspects that when resources are deleted outside terraform, the next terraform actions fail to update the state file correctly.

Steps to Reproduce

Manually delete a terraform deployed resource and then run a plan or destroy.

  1. terraform apply

Important Factoids

References

  • #0000
@ujjwal-ibm
Copy link
Collaborator

Can you provide the list of resources involved ?

@hoiwingh
Copy link
Author

Here's the list of resource types involved. In my case, I have deleted a resource cos_instance of type ibm_resource_instance. Note that it works fine if I rename it (as opposed to deleting).

ibm_cd_toolchain_tool_hostedgit
ibm_cos_bucket
ibm_resource_instance
null_resource
ibm_iam_access_group_policy
ibm_resource_group
external
gitlab_repository_file
ibm_cd_tekton_pipeline
ibm_cd_toolchain_tool_pipeline
ibm_cd_toolchain_tool_hostedgit
ibm_iam_access_group
ibm_cd_tekton_pipeline_definition
ibm_cd_tekton_pipeline_property
ibm_cd_tekton_pipeline_property
ibm_cd_tekton_pipeline_property
ibm_cd_tekton_pipeline_property
ibm_cd_tekton_pipeline_property
ibm_cd_tekton_pipeline_property
ibm_cd_tekton_pipeline_trigger
ibm_cd_toolchain
ibm_resource_group

@hoiwingh
Copy link
Author

@ujjwal-ibm - any update?

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

No branches or pull requests

2 participants