Removes background worker :)

This commit is contained in:
2022-09-28 05:35:28 -07:00
parent c0cd43b248
commit 4042f367a7
3 changed files with 14 additions and 182 deletions

View File

@@ -92,36 +92,6 @@ resource "aws_ecs_service" "integreat_app" {
}
}
resource "aws_ecs_service" "integreat_background_worker" {
name = "integreat_background_worker_${var.stage}"
cluster = var.ecs_cluster
task_definition = aws_ecs_task_definition.integreat_background_worker.arn
desired_count = var.background_desired_count
deployment_controller {
type = "ECS"
}
scheduling_strategy = "REPLICA"
launch_type = "FARGATE"
platform_version = "LATEST"
network_configuration {
assign_public_ip = true
security_groups = [ "sg-004e5855310c453a3", "sg-02d167406b1082698"]
subnets = [ "subnet-5e675761", "subnet-8519fde2", "subnet-89bab8d4" ]
}
service_registries {
container_port = 0
port = 0
registry_arn = aws_service_discovery_service.background_worker_service.arn
}
timeouts {}
lifecycle {
ignore_changes = [task_definition]
}
}
resource "aws_lb" "integreat_app" {
name = "integreat-app-${var.stage}"
@@ -305,25 +275,6 @@ resource "aws_service_discovery_service" "service" {
}
}
resource "aws_service_discovery_service" "background_worker_service" {
name = "integreat-background-worker-${var.stage}"
dns_config {
namespace_id = var.local_namespace
dns_records {
ttl = 10
type = "A"
}
routing_policy = "MULTIVALUE"
}
health_check_custom_config {
failure_threshold = 1
}
}
module "square_import_job" {
source = "./background-job/"
ecs_cluster = var.ecs_cluster