-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[rds] Automatic addDependency for DatabaseProxy.proxyTarget to ensure DB Instances are available #11311
Comments
Thanks for opening the issue @senorkrabs . Any chance of opening us a PR adding this fix? Should be a relatively simple change in Thanks, |
…ailability while creating proxy fixes: aws#11311
…ailability while creating proxy fixes: aws#11311
…ailability while creating proxy fixes: aws#11311
|
When specifying a
DatabaseCluster
for theproxyTarget
prop, CloudFormation will not create a dependency on the underlying DB Instances that are provisioned, and so RDS Proxy Target will fail to provision successfully because DB cluster's instances are not yet in anAVAILABLE
state.Use Case
Consider this scenario, where a DatabaseCluster,
cluster
, is created with DB instances and then referenced inproxyTarget
prop:Deploying this results in an error:
During synthesis, DBProxy and DBProxyTargetGroup begin to provision after
DBCluster
is created, but beforeDBInstances
have been provisioned. Adding this line resolves this:Synthesized result with
DependsOn
:Proposed Solution
Ideally, logic in
DataBaseProxy
would detect this dependency and automatically add the dependency. I suspect this logic could be added in thebind
function of proxy.ts but am not quite sure.Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: