DataSync tasks should have logging enabled¶
This control checks whether an AWS DataSync task has logging enabled. The control fails if the task doesn't have logging enabled.
How to fix¶
Attribute cloudwatch_log_group_arn of aws_datasync_task must be non-empty.
Implementation options¶
Choose the option that matches how you manage Terraform. All options satisfy this control.
Option 1: Terraform AWS provider resources¶
If you manage resources directly, configure the relevant Terraform AWS provider resources to meet this control. See docs for the resources involved: aws_datasync_task.
resource "aws_datasync_task" "this" {
destination_location_arn = "arn:aws:datasync:us-east-1:123456789012:location/loc-abcdef01234567890"
source_location_arn = "arn:aws:datasync:us-east-1:123456789012:location/loc-1234567890abcdef0"
cloudwatch_log_group_arn = "arn:aws:logs:us-east-1:123456789012:log-group:example-log-group"
}
Which option should I choose?
- Compliance.tf module (recommended): controls enforced by default and mapped to frameworks.
- Open source module (
terraform-aws-modules): compatible by design with compliance.tf. Same variable names for an easy, low-change migration path when you are ready. - Terraform AWS provider resources: manage Terraform resources directly.
Tool mappings¶
Use these identifiers to cross-reference this control across tools, reports, and evidence.
Compliance.tf (CTF) Control:
datasync_task_logging_enabledAWS Config Managed Rule:
DATASYNC_TASK_LOGGING_ENABLEDPowerpipe Control:
aws_compliance.control.datasync_task_logging_enabled