terraform apply
terraform destroy
I updated few things but when I use terraform apply it throwing already exist when i use terraform destroy destroy completed but 0 resources deleted
terraform apply
I updated few things but when I use terraform apply it throwing already exist when i use terraform destroy destroy completed but 0 resources deleted
Hi @rrr-kgf,
Based on what you shared here, Terraform seems to have behaved as I would have expected: creating this object failed, and so when you ran the destroy command there were no objects to destroy and therefore Terraform reported “no changes”.
Terraform will only plan to destroy objects that are under Terraform’s management. It seems that you have an existing object that was created outside of Terraform that conflicts with what you told Terraform it should manage, and so to make progress you will need to choose one of the following options:
terraform import
command. If you do this, you are effectively saying that this object will now be managed only by Terraform and never manually through the UI or API and never with any other Terraform-like software. Terraform will then treat the object as if it was created in Terraform, including potentially destroying the object if asked to.terraform apply
to let Terraform create a replacement object that it will then manage.