Skip to content

Commit

Permalink
fix(rds): proxy target group does not depend on database instances wh…
Browse files Browse the repository at this point in the history
…en using writer property for database cluster (#31354)

### Issue # (if applicable)

Closes #31304 .

### Reason for this change



Proxy Target Group should depend on and wait for Aurora instances to be ready before creating CloudFormation resource. (see the issue).

Now, the dependency is added when using a legacy `instanceProps`, but not added when using a `writer` property. 

https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-rds/lib/proxy.ts#L535-L539

(The cluster has `CfnDBInstance` directly when using the `instanceProps`, but it has `AuroraClusterInstance` with `CfnDBInstance` as `defaultChild` when using the `writer`. So the cluster doesn't have the `CfnDBInstance` directly in the latter case.)

### Description of changes



Added the dependency when using a `writer` property instead of `instanceProps`.

### Description of how you validated changes



Both unit and integ tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
go-to-k authored Sep 9, 2024
1 parent 7abe8fc commit 6542207
Show file tree
Hide file tree
Showing 10 changed files with 3,320 additions and 1,365 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6542207

Please sign in to comment.