# DMS source endpoint getting updated in each deployment

**URL:** <https://discuss.hashicorp.com/t/dms-source-endpoint-getting-updated-in-each-deployment/64513>\
**Category:** AWS\
**Created:** [April 3, 2024, 9:19am UTC](https://discuss.hashicorp.com/t/dms-source-endpoint-getting-updated-in-each-deployment/64513 "2024-04-03T09:19:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sayali.kadam01](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@sayali.kadam01](https://discuss.hashicorp.com/u/sayali.kadam01)\
**Post date:** [April 3, 2024, 9:19am UTC](https://discuss.hashicorp.com/t/dms-source-endpoint-getting-updated-in-each-deployment/64513/1 "2024-04-03T09:19:41Z")

</div>

I am working on DMS service to replicate data from aurora mysql db to s3 bucket.  
All the resources like DMS source endpoint, target endpoint, migration tasks, IAM role/policies are created via terraform.  
Source endpoint is defined as below resource “aws\_dms\_endpoint” “dms\_source\_endpoint” {  
database\_name = local.source\_db\_name  
endpoint\_id = “source-endpoint"  
endpoint\_type = “source”  
engine\_name = “aurora”  
kms\_key\_arn = aws\_kms\_key.dms\_kms\_key[0].arn  
secrets\_manager\_access\_role\_arn = aws\_iam\_role.dms\_role[0].arn  
secrets\_manager\_arn = “secret-arn”  
}  
While deploying code each time terraform plan shows source endpoint update in place with database name being added.  
Eg.,  
resource “aws\_dms\_endpoint” “dms\_source\_endpoint” {  
+ database\_name = “test\_db”  
id = "source-endpoint”  
# (10 unchanged attributes hidden)  
}  
Since terraform tries to update source endpoint in each deployment so we have to stop the replication task otherwise deployment fails.  
Any idea how we can avoid getting source endpoint update as part of terraform plan.
