Skip to content

Commit

Permalink
Add network_configuration to aws_ecs_service (pe-worker-shodan) (#2371)
Browse files Browse the repository at this point in the history
* Add network_configuration to aws_ecs_service

* Fix subnets assignment
  • Loading branch information
aloftus23 authored Nov 7, 2023
1 parent f96a470 commit a58c780
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/tasks/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ scanExecution:
handler: src/tasks/scanExecution.handler
timeout: 300 # 5 minutes
environment:
SQS_QUEUE_NAME: ${self:provider.stage}-worker-queue
SQS_QUEUE_NAME: ${self:provider.stage}-worker-control-queue
events:
- sqs:
arn:
Expand Down
4 changes: 4 additions & 0 deletions infrastructure/pe_worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,8 @@ resource "aws_ecs_service" "shodan_service" {
task_definition = aws_ecs_task_definition.pe_worker.arn
launch_type = "FARGATE"
desired_count = 0 # Initially set to 0, plan to start it dynamically
network_configuration {
subnets = aws_subnet.worker.*.id
security_groups = [aws_security_group.worker.id]
}
}

0 comments on commit a58c780

Please sign in to comment.