Skip to content

Commit

Permalink
fix(logs): DataProtectionPolicy template key must be PascalCase (#3…
Browse files Browse the repository at this point in the history
…3462)

### Issue # (if applicable)

Closes #33408
Closes #26728

### Reason for this change
Invalid DataProtectionPolicy syntax

### Description of changes
Change template key from camelCase > PascalCase

### Description of how you validated changes
Unit + integration

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
phuhung273 authored Feb 19, 2025
1 parent 7901f07 commit 0379878
Show file tree
Hide file tree
Showing 11 changed files with 214 additions and 203 deletions.

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.

Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,13 @@
"Type": "AWS::Logs::LogGroup",
"Properties": {
"DataProtectionPolicy": {
"name": "policy-name",
"description": "policy description",
"version": "2021-06-01",
"configuration": {
"customDataIdentifier": [
{
"name": "EmployeeId",
"regex": "EmployeeId-\\d{9}"
}
]
},
"statement": [
"Name": "policy-name",
"Description": "policy description",
"Version": "2021-06-01",
"Statement": [
{
"sid": "audit-statement-cdk",
"dataIdentifier": [
"Sid": "audit-statement-cdk",
"DataIdentifier": [
{
"Fn::Join": [
"",
Expand All @@ -58,16 +50,16 @@
},
"EmployeeId"
],
"operation": {
"audit": {
"findingsDestination": {
"cloudWatchLogs": {
"logGroup": {
"Operation": {
"Audit": {
"FindingsDestination": {
"CloudWatchLogs": {
"LogGroup": {
"Ref": "LogGroupLambdaAuditF8F47F46"
}
},
"s3": {
"bucket": {
"S3": {
"Bucket": {
"Ref": "auditbucketidE6660EBD"
}
}
Expand All @@ -76,8 +68,8 @@
}
},
{
"sid": "redact-statement-cdk",
"dataIdentifier": [
"Sid": "redact-statement-cdk",
"DataIdentifier": [
{
"Fn::Join": [
"",
Expand All @@ -104,13 +96,21 @@
},
"EmployeeId"
],
"operation": {
"deidentify": {
"maskConfig": {}
"Operation": {
"Deidentify": {
"MaskConfig": {}
}
}
}
]
],
"Configuration": {
"CustomDataIdentifier": [
{
"Name": "EmployeeId",
"Regex": "EmployeeId-\\d{9}"
}
]
}
},
"RetentionInDays": 731
},
Expand Down

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.

Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ class LogGroupIntegStack extends Stack {
const app = new App();
const stack = new LogGroupIntegStack(app, 'aws-cdk-log-group-integ');
new IntegTest(app, 'LogGroupInteg', { testCases: [stack] });
app.synth();
Loading

0 comments on commit 0379878

Please sign in to comment.