- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 9
add subnet_group_id optional override for subnet group id #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
add subnet_group_id optional override for subnet group id #43
Conversation
c1e7b84    to
    9f1aa78      
    Compare
  
    |  | ||
| resource "aws_dms_replication_subnet_group" "default" { | ||
| count = local.enabled ? 1 : 0 | ||
| count = local.enabled && var.create_subnet_group ? 1 : 0 | 
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 😄
| /terratest | 
There was a problem hiding this 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!
what
NOw if you provide a variable
subnet_group_idto 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