Skip to content

Conversation

@Quixotical
Copy link

what

NOw if you provide a variable subnet_group_id to the terraform module, it will use that as the name of the subnet group that you create. This will allow multiple dms replication instances to use the same DMS subnet group.

why

We need this functionality because AWS has limits on the number of DMS subnet groups that you can create. (It's 60) we have a very large volume of replications required in our system, and so we will hit that limit. We can always ask to have it continually increased, but all of these replication instances will be using the exact same subnet configuration and it's redundant to keep making the same configuration over and over again, and asking AWS to increase their limits.

references

https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Limits.html#CHAP_Limits.Limits

@Quixotical Quixotical requested review from a team as code owners October 17, 2025 23:03
@Quixotical Quixotical requested review from nitrocode and oycyc October 17, 2025 23:03
@mergify mergify bot added the triage Needs triage label Oct 17, 2025
@Quixotical Quixotical force-pushed the add-subnet-group-override-name branch from c1e7b84 to 9f1aa78 Compare October 17, 2025 23:08

resource "aws_dms_replication_subnet_group" "default" {
count = local.enabled ? 1 : 0
count = local.enabled && var.create_subnet_group ? 1 : 0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better if this checks if a var.subnet_group_id is passed in? This way, if a consumer passes in a subnet group, the module knows not to create a subnet group.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that's a great idea, I'll push that change now, thanks for the input!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alrighty, change is applied, let me know what you think 😄

@oycyc
Copy link

oycyc commented Oct 22, 2025

/terratest

Copy link

@oycyc oycyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you for the PR!

@oycyc oycyc added enhancement New feature or request feature New functionality and removed triage Needs triage labels Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants