diff --git a/.gitignore b/.gitignore index 8e782a8..7b24a09 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .external_modules +.idea \ No newline at end of file diff --git a/addons/external-vuln-scans/main.tf b/addons/external-vuln-scans/main.tf index e38514e..824db97 100644 --- a/addons/external-vuln-scans/main.tf +++ b/addons/external-vuln-scans/main.tf @@ -68,6 +68,8 @@ resource "aws_ecs_task_definition" "vuln-processing" { networkMode = "awsvpc" secrets = local.secrets repositoryCredentials = local.repository_credentials + mountPoints = var.fleet_config.mount_points + dependsOn = var.fleet_config.depends_on ulimits = [ { name = "nofile" @@ -131,6 +133,33 @@ resource "aws_ecs_task_definition" "vuln-processing" { } }] , var.fleet_config.sidecars)) + + dynamic "volume" { + for_each = var.fleet_config.volumes + content { + name = volume.value.name + host_path = lookup(volume.value, "host_path", null) + + dynamic "docker_volume_configuration" { + for_each = lookup(volume.value, "docker_volume_configuration", []) + content { + scope = lookup(docker_volume_configuration.value, "scope", null) + autoprovision = lookup(docker_volume_configuration.value, "autoprovision", null) + driver = lookup(docker_volume_configuration.value, "driver", null) + driver_opts = lookup(docker_volume_configuration.value, "driver_opts", null) + labels = lookup(docker_volume_configuration.value, "labels", null) + } + } + + dynamic "efs_volume_configuration" { + for_each = lookup(volume.value, "efs_volume_configuration", []) + content { + file_system_id = lookup(efs_volume_configuration.value, "file_system_id", null) + root_directory = lookup(efs_volume_configuration.value, "root_directory", null) + } + } + } + } }