[Bug]: Cannot deploy more than one DMS aws_dms_replication_config due to duplicate service-linked role name #37434
Labels
bug
Addresses a defect in current functionality.
service/dms
Issues and PRs that pertain to the dms service.
Terraform Core Version
1.4.6
AWS Provider Version
5.49.0
Affected Resource(s)
aws_dms_replication_config
Expected Behavior
Create multiple replication configs
Actual Behavior
The first replication is created and programmatically in the process spawns a service-linked IAM role apparently called "AWSServiceRoleForDMSServerless". Subsequent deploying configs try to do the exact same thing, spawning a role named "AWSServiceRoleForDMSServerless" which fails because the role with that name already exists. This means only the first replication config is provisioned and all others fail.
Given that the module does not support custom roles or role suffixes, I cannot see any workaround for this behavior.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Try to provision multiple replication configs. Watch them fail with the service-linked role error. Confirm reason for SLR failure in CloudTrail.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
DMS docs
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: