In both cloud IaaS and on premise, images are cycled/updated over time. From what I can tell, if the source image changes, Terraform will attempt to destroy and redeploy the server, which is simply not always an option. So taking the scenario
- create “myapp” plan, which includes 3 servers, an a LB rule. Plan and Deploy
- 6 months later “myapp” needs a new load balancer rule, so the plan is updated and tested
- the original image used to deploy has been replaced, so now terraform either fails (if it was explicitly defined to a nonexistent imageID) or wants to rip/replace (found a matching name, but he ID doesn’t match) the three servers.
This seems … problematic to say the least. How do people handle this sort of thing? Is Terraform basically taking the stance of “nothing should be long lived”? Is there a way to tell Terraform to ignore certain aspects of infrastructure once deployed (hey man, Ansible has this now, just make sure it exists )or perhaps simply ignore certain attributes (yeah, the source image is gone, but you already deployed … so chill)?