Skip to content

Commit

Permalink
feat: add copyTagsToSnapshot property
Browse files Browse the repository at this point in the history
  • Loading branch information
mazyu36 committed May 9, 2024
1 parent e9e800f commit 3f9b7f6
Show file tree
Hide file tree
Showing 14 changed files with 2,391 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as cdk from 'aws-cdk-lib';
import * as integ from '@aws-cdk/integ-tests-alpha';
import { DatabaseCluster } from 'aws-cdk-lib/aws-docdb';

const app = new cdk.App();

const stack = new cdk.Stack(app, 'aws-cdk-docdb-integ');

const vpc = new ec2.Vpc(stack, 'VPC');

new DatabaseCluster(stack, 'DatabaseCopyTagsToSnapshotDisabled', {
engineVersion: '3.6.0',
masterUser: {
username: 'docdb',
password: cdk.SecretValue.unsafePlainText('7959866cacc02c2d243ecfe177464fe6'),
},
instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE),
vpc,
removalPolicy: cdk.RemovalPolicy.DESTROY,
copyTagsToSnapshot: false,
});

new DatabaseCluster(stack, 'DatabaseCopyTagsToSnapshotEnabled', {
engineVersion: '3.6.0',
masterUser: {
username: 'docdb',
password: cdk.SecretValue.unsafePlainText('7959866cacc02c2d243ecfe177464fe6'),
},
instanceType: ec2.InstanceType.of(ec2.InstanceClass.R5, ec2.InstanceSize.LARGE),
vpc,
removalPolicy: cdk.RemovalPolicy.DESTROY,
copyTagsToSnapshot: true,
});

new integ.IntegTest(app, 'ClusterTest', {
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.

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 3f9b7f6

Please sign in to comment.