Skip to content

Commit

Permalink
updated retention policy
Browse files Browse the repository at this point in the history
  • Loading branch information
lpizzinidev committed Dec 10, 2023
1 parent 64c0924 commit 15b3651
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.

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

Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
"Version": "2012-10-17"
}
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"LogGroupF5B46931": {
"Type": "AWS::Logs::LogGroup",
Expand All @@ -95,8 +95,8 @@
},
"RetentionInDays": 731
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Parameters": {
Expand Down

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

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { App, Stack, StackProps } from 'aws-cdk-lib';
import { App, Stack, StackProps, RemovalPolicy } from 'aws-cdk-lib';
import { IntegTest } from '@aws-cdk/integ-tests-alpha';
import { LogGroup } from 'aws-cdk-lib/aws-logs';
import { Key } from 'aws-cdk-lib/aws-kms';
Expand All @@ -7,9 +7,12 @@ class LogGroupIntegStack extends Stack {
constructor(scope: App, id: string, props?: StackProps) {
super(scope, id, props);

const key = new Key(this, 'Key');
const key = new Key(this, 'Key', {
removalPolicy: RemovalPolicy.DESTROY,
});

new LogGroup(this, 'LogGroup', {
removalPolicy: RemovalPolicy.DESTROY,
encryptionKey: key,
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"35.0.0"}
{"version":"34.0.0"}

0 comments on commit 15b3651

Please sign in to comment.