Skip to content

Commit

Permalink
Add data protection policy (#2165)
Browse files Browse the repository at this point in the history
  • Loading branch information
gillettmoj authored Nov 1, 2024
1 parent d566766 commit 3c4c737
Showing 1 changed file with 15 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
resource "aws_cloudwatch_log_data_protection_policy" "application_logs" {

log_group_name = "${var.environment_name}_application_logs"

resource "aws_cloudwatch_log_account_policy" "data_protection" {
policy_name = "data-protection"
policy_type = "DATA_PROTECTION_POLICY"
policy_document = jsonencode({
Name = "data_protection_${var.environment_name}_application_logs"
Name = "DataProtection"
Version = "2021-06-01"

"Statement" : [
Statement = [
{
"Sid" : "audit-policy",
"DataIdentifier" : [
"arn:aws:dataprotection::aws:data-identifier/EmailAddress"
],
"Operation" : {
"Audit" : {
"FindingsDestination" : {}
Sid = "Audit"
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" : {}
Sid = "Redact"
DataIdentifier = ["arn:aws:dataprotection::aws:data-identifier/EmailAddress"]
Operation = {
Deidentify = {
MaskConfig = {}
}
}
}
Expand Down

0 comments on commit 3c4c737

Please sign in to comment.