Unsecured Encryption in transit for EFS volumes High

Unsecured Encryption in transit is detected for EFS volumes in ECS task definitions. Make sure that EFS volumes in ECS Task Definitions is securely encrypted in transit.

Detector ID
terraform/unsecure-encrypt-efs-terraform@v1.0
Category
Common Weakness Enumeration (CWE) external icon

Noncompliant example

1resource "aws_ecs_task_definition" "service" {
2  family = "cloudrail-test-encryption"
3  volume {
4    name = "service-storage"
5
6    efs_volume_configuration {
7      # Noncompliant: Encryption in transit is not enabled for EFS volumes in ECS Task definitions.
8      file_system_id = aws_efs_file_system.test.id
9      root_directory = "/opt/data"
10    }
11  }
12  container_definitions = ""
13}

Compliant example

1resource "aws_ecs_task_definition" "service" {
2  family = "cloudrail-test-encryption"
3  volume {
4    name = "service-storage"
5
6    efs_volume_configuration {
7      file_system_id = aws_efs_file_system.test.id
8      root_directory = "/opt/data"
9      # Compliant: Encryption in transit is enabled for EFS volumes in ECS Task definitions.
10      transit_encryption = "ENABLED"
11    }
12  }
13  container_definitions = ""
14}