I Deleted an EC2 Instance Behind Terraform's Back. Here's What Happened
In my previous Terraform post, I built a disposable Ubuntu EC2 instance with Docker installed. I could run terraform apply, get a clean Docker host, use it and destroy it when I was done. That solved the problem I had at the time. But what happens if I lose the state file? What happens if somebody deletes the instance directly in AWS? Does Terraform immediately create another one like Kubernetes would? What happens when a resource has to be replaced, and how do I stop a bad Terraform change from quietly reaching main? ...