New to Terraform. Experimented a lot past days. Still trying to get my head around some of the behaviour.
I created an AWS instance with a webserver in it then I wanted to update it by adding some tags and keypair. I noticed Terraform is destroying the instance and recreating it.
I can imagine a situation where I have some servers in production running some webapp and I want to rename it. Then essentially it would destroy and recreate my server. which means I will loose my project data in "/var/www/html" While I understand it's the way Terraform works, I fail to see the use here.
what is the solution here other than taking backup of project folder before updating the terraform module ?