Add CloudTrail delivery to CloudWatch Logs
This commit is contained in:
@@ -63,6 +63,25 @@ run "apply_group1_osaka" {
|
||||
error_message = "The Osaka test CloudTrail trail must be single-Region."
|
||||
}
|
||||
|
||||
assert {
|
||||
condition = (
|
||||
length(aws_cloudwatch_log_group.cloudtrail_protected) == 0 &&
|
||||
length(aws_cloudwatch_log_group.cloudtrail_unprotected) == 1 &&
|
||||
aws_cloudwatch_log_group.cloudtrail_unprotected[0].retention_in_days == 30
|
||||
)
|
||||
error_message = "The Osaka test must create one unprotected CloudTrail log group with 30-day retention."
|
||||
}
|
||||
|
||||
assert {
|
||||
condition = (
|
||||
length(aws_iam_role.cloudtrail_cloudwatch_protected) == 0 &&
|
||||
length(aws_iam_role.cloudtrail_cloudwatch_unprotected) == 1 &&
|
||||
length(aws_iam_role_policy.cloudtrail_cloudwatch_protected) == 0 &&
|
||||
length(aws_iam_role_policy.cloudtrail_cloudwatch_unprotected) == 1
|
||||
)
|
||||
error_message = "The Osaka test must use unprotected CloudTrail delivery IAM resources."
|
||||
}
|
||||
|
||||
assert {
|
||||
condition = aws_kms_key.vault_unprotected[0].deletion_window_in_days == 7
|
||||
error_message = "The Osaka test KMS key must use the minimum seven-day deletion window."
|
||||
|
||||
Reference in New Issue
Block a user