Skip to content

Commit a29c220

Browse files
fix: add KMS encryption to DynamoDB state lock table and suppress S3 checks
- Add kms_key_arn to DynamoDB server_side_encryption (CKV_AWS_119) - Add CKV2_AWS_62, CKV_AWS_18, CKV_AWS_144 to .checkov.baseline for aws_s3_bucket.terraform_state (event notifications, access logging, and cross-region replication are not needed for a Terraform state bucket)
1 parent 46d934e commit a29c220

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

infrastructure/terraform/.checkov.baseline

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,19 @@
367367
}
368368
]
369369
},
370+
{
371+
"file": "/backend.tf",
372+
"findings": [
373+
{
374+
"resource": "aws_s3_bucket.terraform_state",
375+
"check_ids": [
376+
"CKV2_AWS_62",
377+
"CKV_AWS_18",
378+
"CKV_AWS_144"
379+
]
380+
}
381+
]
382+
},
370383
{
371384
"file": "/cloudfront.tf",
372385
"findings": [
@@ -948,4 +961,4 @@
948961
]
949962
}
950963
]
951-
}
964+
}

infrastructure/terraform/backend.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ resource "aws_dynamodb_table" "terraform_state_lock" {
158158
}
159159

160160
server_side_encryption {
161-
enabled = true
161+
enabled = true
162+
kms_key_arn = aws_kms_key.terraform_state.arn
162163
}
163164

164165
tags = merge(local.common_tags, {

0 commit comments

Comments
 (0)