Terraform Apply

Hello Everyone, I have a issue where terraform plan showed 250 resources will be added, but when i ran the apply command after approx 50 resources where shown as creating the errors popped in and failed. Will the 50 resources that were shown as creating initially after running the terraform command will still be created. what is the solution to find those resources and delete if created?

Hi @Harish-0404,

terraform apply writes out messages describing the actions it’s taking in realtime, so you should see some messages like Creating ... in the output. Any object that you see listed in such a message that wasn’t eventually reported as an error will have already been created in your remote system.

As long as Terraform ran to completion properly (that is, nothing outside of Terraform made it terminate ungracefully), those objects should be tracked in Terraform’s state and so you can run terraform show to see the details about them.

If you want to destroy those objects and start again, you can run terraform destroy to see Terraform’s proposal to destroy all of those objects. If you answer “yes” then Terraform will attempt to destroy them all.