-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add cloudwatch_data_protection_policy.tf * Stub out OS address lookups as AXIS doesn't exist anymore. * Ensure stubs working as expected with a bit of regexp * Update tests as stubs produce more data than expected --------- Co-authored-by: Adam Cooper <[email protected]>
- Loading branch information
1 parent
051c9fd
commit 0f0d7e4
Showing
7 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
terraform/environment/modules/environment/cloudwatch_data_protection_policy.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
resource "aws_cloudwatch_log_data_protection_policy" "application_logs" { | ||
|
||
log_group_name = aws_cloudwatch_log_group.application_logs.name | ||
|
||
policy_document = jsonencode({ | ||
Name = "data_protection_${var.environment_name}_application_logs" | ||
Version = "2021-06-01" | ||
|
||
"Statement" : [ | ||
{ | ||
"Sid" : "audit-policy", | ||
"DataIdentifier" : [ | ||
"arn:aws:dataprotection::aws:data-identifier/EmailAddress" | ||
], | ||
"Operation" : { | ||
"Audit" : { | ||
"FindingsDestination" : {} | ||
} | ||
} | ||
}, | ||
{ | ||
"Sid" : "redact-policy", | ||
"DataIdentifier" : [ | ||
"arn:aws:dataprotection::aws:data-identifier/EmailAddress" | ||
], | ||
"Operation" : { | ||
"Deidentify" : { | ||
"MaskConfig" : {} | ||
} | ||
} | ||
} | ||
] | ||
}) | ||
} |