Skip to content
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

feat(rds): support CA certificate for cluster instances #27138

Merged
merged 3 commits into from
Sep 18, 2023

Conversation

lpizzinidev
Copy link
Contributor

Exposes the caCertificate property for an RDS cluster instance to allow specifying a custom CA identifier using the CaCertificate class.

Usage:

new DatabaseCluster(this, 'Database', {
  engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_3_01_0 }),
  writer: rds.ClusterInstance.provisioned('writer', {
    caCertificate: rds.CaCertificate.RDS_CA_RDS2048_G1,
  }),
  readers: [
    rds.ClusterInstance.serverlessV2('reader', {
      caCertificate: rds.CaCertificate.of('custom-ca'),
    }),
  ],
  vpc,
});

Closes #26865.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1 labels Sep 14, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team September 14, 2023 07:24
@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Sep 14, 2023
@mrgrain
Copy link
Contributor

mrgrain commented Sep 18, 2023

This looks great, thank you! I'm just running the integration test to confirm. Will approve shortly.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: b52fc48
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Sep 18, 2023

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit f5a5a08 into aws:main Sep 18, 2023
10 checks passed
@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Sep 18, 2023
HBobertz pushed a commit that referenced this pull request Sep 18, 2023
Exposes the `caCertificate` property for an RDS cluster instance to allow specifying a custom CA identifier using the `CaCertificate` class.

Usage:
```
new DatabaseCluster(this, 'Database', {
  engine: rds.DatabaseClusterEngine.auroraMysql({ version: rds.AuroraMysqlEngineVersion.VER_3_01_0 }),
  writer: rds.ClusterInstance.provisioned('writer', {
    caCertificate: rds.CaCertificate.RDS_CA_RDS2048_G1,
  }),
  readers: [
    rds.ClusterInstance.serverlessV2('reader', {
      caCertificate: rds.CaCertificate.of('custom-ca'),
    }),
  ],
  vpc,
});
```

Closes #26865.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@dextel2
Copy link

dextel2 commented Sep 19, 2023

Has this been released yet?

@mrgrain
Copy link
Contributor

mrgrain commented Sep 19, 2023

Has this been released yet?

Not yet. Should be released some time later this week.

@vumdao
Copy link

vumdao commented Sep 22, 2023

Waiting for this release to update CA for our RDS instances

@mrgrain
Copy link
Contributor

mrgrain commented Sep 22, 2023

Waiting for this release to update CA for our RDS instances

It's in progress. Not withstanding any catastrophic failures, it should be out later today

@dextel2
Copy link

dextel2 commented Sep 25, 2023

This has been released

mergify bot pushed a commit that referenced this pull request May 9, 2024
Exposes the [CaCertificateIdentifier](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html#cfn-docdb-dbinstance-cacertificateidentifier) property of [AWS::DocDB::DBInstance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbinstance.html) in the L2 constructs `DatabaseCluster` and `DatabaseInstance` of `aws_docdb`. This allows specifying a custom CA identifier using the CaCertificate class.

Usage with `DatabaseCluster`:

```typescript
new DatabaseCluster(stack, 'Database', {
  // ...
  instanceType: InstanceType.of(InstanceClass.R5, InstanceSize.LARGE),
  instanceCaCertificate: CaCertificate.RDS_CA_RSA4096_G1,
  // ...
});
```

Usage with `DatabaseInstance`:

```typescript
new DatabaseInstance(stack, 'Instance', {
  cluster: databaseCluster,
  instanceType: InstanceType.of(InstanceClass.R5, InstanceSize.LARGE),
  caCertificate: CaCertificate.RDS_CA_RSA4096_G1,
});
```

This is modelled on #27138.

Closes #28356.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(RDS): Support RDS certificate authority
5 participants