terraform-provider-ibm
terraform-provider-ibm copied to clipboard
Error in Terraform operations after manual deletion of resources
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.
terraform apply
Important Factoids
References
- #0000
Can you provide the list of resources involved ?
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
@ujjwal-ibm - any update?