# Load Balancer Service Continuity During Instance Replacement

**URL:** <https://discuss.hashicorp.com/t/load-balancer-service-continuity-during-instance-replacement/43616>\
**Category:** AWS\
**Created:** [August 25, 2022, 5:05pm UTC](https://discuss.hashicorp.com/t/load-balancer-service-continuity-during-instance-replacement/43616 "2022-08-25T17:05:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![igor-borisoglebski](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/igor-borisoglebski/32/30310_2.png) [@igor-borisoglebski](https://discuss.hashicorp.com/u/igor-borisoglebski)\
**Post date:** [August 25, 2022, 5:05pm UTC](https://discuss.hashicorp.com/t/load-balancer-service-continuity-during-instance-replacement/43616/1 "2022-08-25T17:05:08Z")

</div>

Hi all,

imagine a scenario on aws where there is a NLB with target groups attached to a couple of instances already deployed with terraform. Then, there is a need to replace these instances due to an AMI update. This will result in these 2 instances to be destroyed and added as well as the respective aws\_lb\_target\_group\_attachment.

Am I correct in considering that there will be a temporary service disruption as these 4 resources are destroyed and added during the apply procedure? Is there a way to avoid that? The aws\_instance resources have a create\_before\_destroy statement, but I don’t think that makes a difference as both tg attachments are replaced simultaneously.

The solution I’m thinking about is to do a apply -target to one of the instances and tg attachments, followed later by the other one. But this is not a great solution really.
