Teraaform resources creation with multiple run

I have a terraform file which is creating reaources with passing some patameters

Let’s say creating snapshot for any instance

But when i rerun the terraform with different instance id it will destroy and create new one

What is the solution so it should not destroy and create

Rather just create new one without destroying previous one

With same state file

If not what could be the alternative solution

Hi @k19.jitendra,

Resources like that don’t really fit within the intended design of Terraform, Terraform expects to handle the full lifecycle of any object it manages. It is workflow we’re intending to design a way to deal with(removed blocks were a first step), but in the meantime you will still need to use terraform state rm to instruct Terraform that it can forget a particular instance.