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 21, 2023
1 parent 6a9278f commit 1d3526b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 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

0 comments on commit 1d3526b

Please sign in to comment.