Skip to content

Commit

Permalink
feat(docdb): support CA certificate for cluster instances
Browse files Browse the repository at this point in the history
  • Loading branch information
brokad committed Jan 20, 2024
1 parent 3656a4c commit 47b79f6
Show file tree
Hide file tree
Showing 16 changed files with 1,868 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { InstanceClass, InstanceSize, InstanceType, Vpc, SubnetType } from 'aws-cdk-lib/aws-ec2';
import { App, Stack, RemovalPolicy, SecretValue } from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { CaCertificate, DatabaseCluster } from 'aws-cdk-lib/aws-docdb';

const app = new App();

const stack = new Stack(app, 'cdk-integ-docdb-cluster-instance-ca-certificate');

const vpc = new Vpc(stack, 'VPC', { maxAzs: 2, restrictDefaultSecurityGroup: false });

const instanceType = InstanceType.of(InstanceClass.R5, InstanceSize.LARGE);

new DatabaseCluster(stack, 'Database', {
masterUser: {
username: 'docdb',
password: SecretValue.unsafePlainText('7959866cacc02c2d243ecfe177464fe6'),
},
instanceType: instanceType,
instanceCaCertificate: CaCertificate.RDS_CA_RSA4096_G1,
vpcSubnets: { subnetType: SubnetType.PUBLIC },
vpc,
removalPolicy: RemovalPolicy.DESTROY,
});

new integ.IntegTest(app, 'ClusterInstanceCACertificateTest', {
testCases: [stack],
});

app.synth();

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

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

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

Loading

0 comments on commit 47b79f6

Please sign in to comment.