Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rds): dual-stack mode support (#22596)
This PR adds dual-stack mode support to RDS instances and clusters. ### Aurora - Working with a DB cluster in a VPC https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html - CloudFormation AWS::RDS::DBCluster https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-networktype ```ts declare const vpc: ec2.Vpc; // VPC and subnets must have IPv6 CIDR blocks const cluster = new rds.DatabaseCluster(this, 'Database', { engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_3_02_1 }), instanceProps: { vpc, publiclyAccessible: false, }, networkType: rds.NetworkType.DUAL, }); ``` ### RDS - Working with a DB instance in a VPC https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html - CloudFormation AWS::RDS::DBInstance https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbinstance.html#cfn-rds-dbinstance-networktype ```ts declare const vpc: ec2.Vpc; // VPC and subnets must have IPv6 CIDR blocks const instance = new rds.DatabaseInstance(this, 'Instance', { engine: rds.DatabaseInstanceEngine.postgres({ version: rds.PostgresEngineVersion.VER_14_4 }), vpc, networkType: rds.NetworkType.DUAL, publiclyAccessible: false, }); ``` Note: CDK cannot check whether the specified VPC and subnets have actually IPv6 CIDR blocks because `ec2.IVpc` and `ec2.ISubnet` does not have ipv6 attributes. (cf. #19525) ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information