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

View File

@@ -1,7 +1,7 @@
{
"version": 4,
"terraform_version": "1.2.7",
"serial": 208,
"serial": 212,
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
"outputs": {
"aws_access_key_id": {
@@ -118,7 +118,7 @@
],
"deployment_maximum_percent": 200,
"deployment_minimum_healthy_percent": 100,
"desired_count": 2,
"desired_count": 4,
"enable_ecs_managed_tags": false,
"enable_execute_command": false,
"force_new_deployment": null,
@@ -164,7 +164,7 @@
],
"tags": {},
"tags_all": {},
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_prod:365",
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_prod:368",
"timeouts": {
"delete": null
},
@@ -180,84 +180,6 @@
}
]
},
{
"mode": "managed",
"type": "aws_ecs_service",
"name": "integreat_background_worker",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"capacity_provider_strategy": [],
"cluster": "arn:aws:ecs:us-east-1:679918342773:cluster/default",
"deployment_circuit_breaker": [
{
"enable": false,
"rollback": false
}
],
"deployment_controller": [
{
"type": "ECS"
}
],
"deployment_maximum_percent": 200,
"deployment_minimum_healthy_percent": 100,
"desired_count": 1,
"enable_ecs_managed_tags": false,
"enable_execute_command": false,
"force_new_deployment": null,
"health_check_grace_period_seconds": 0,
"iam_role": "aws-service-role",
"id": "arn:aws:ecs:us-east-1:679918342773:service/default/integreat_background_worker_prod",
"launch_type": "FARGATE",
"load_balancer": [],
"name": "integreat_background_worker_prod",
"network_configuration": [
{
"assign_public_ip": true,
"security_groups": [
"sg-004e5855310c453a3",
"sg-02d167406b1082698"
],
"subnets": [
"subnet-5e675761",
"subnet-8519fde2",
"subnet-89bab8d4"
]
}
],
"ordered_placement_strategy": [],
"placement_constraints": [],
"platform_version": "LATEST",
"propagate_tags": "NONE",
"scheduling_strategy": "REPLICA",
"service_registries": [
{
"container_name": "",
"container_port": 0,
"port": 0,
"registry_arn": "arn:aws:servicediscovery:us-east-1:679918342773:service/srv-ogsibykufe2sjr75"
}
],
"tags": {},
"tags_all": {},
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_background-worker_prod:344",
"timeouts": {
"delete": null
},
"wait_for_steady_state": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxMjAwMDAwMDAwMDAwfX0=",
"dependencies": [
"aws_ecs_task_definition.integreat_background_worker",
"aws_service_discovery_service.background_worker_service"
]
}
]
},
{
"mode": "managed",
"type": "aws_ecs_task_definition",
@@ -927,47 +849,6 @@
}
]
},
{
"mode": "managed",
"type": "aws_service_discovery_service",
"name": "background_worker_service",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:servicediscovery:us-east-1:679918342773:service/srv-ogsibykufe2sjr75",
"description": "",
"dns_config": [
{
"dns_records": [
{
"ttl": 10,
"type": "A"
}
],
"namespace_id": "ns-gv2z744em7myo2jp",
"routing_policy": "MULTIVALUE"
}
],
"force_destroy": null,
"health_check_config": [],
"health_check_custom_config": [
{
"failure_threshold": 1
}
],
"id": "srv-ogsibykufe2sjr75",
"name": "integreat-background-worker-prod",
"namespace_id": "ns-gv2z744em7myo2jp",
"tags": {},
"tags_all": {}
},
"sensitive_attributes": [],
"private": "bnVsbA=="
}
]
},
{
"mode": "managed",
"type": "aws_service_discovery_service",
@@ -1730,7 +1611,7 @@
"name_prefix": "",
"role_arn": "",
"schedule_expression": "rate(6 hours)",
"tags": null,
"tags": {},
"tags_all": {}
},
"sensitive_attributes": [],
@@ -1774,7 +1655,7 @@
"placement_constraint": [],
"platform_version": "",
"propagate_tags": "TASK_DEFINITION",
"tags": null,
"tags": {},
"task_count": 1,
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/plaid_prod:1"
}

View File

@@ -1,7 +1,7 @@
{
"version": 4,
"terraform_version": "1.2.7",
"serial": 205,
"serial": 208,
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
"outputs": {
"aws_access_key_id": {
@@ -1730,7 +1730,7 @@
"name_prefix": "",
"role_arn": "",
"schedule_expression": "rate(6 hours)",
"tags": {},
"tags": null,
"tags_all": {}
},
"sensitive_attributes": [],
@@ -1774,7 +1774,7 @@
"placement_constraint": [],
"platform_version": "",
"propagate_tags": "TASK_DEFINITION",
"tags": {},
"tags": null,
"task_count": 1,
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/plaid_prod:1"
}
@@ -1994,7 +1994,7 @@
"name_prefix": "",
"role_arn": "",
"schedule_expression": "rate(5 hours)",
"tags": null,
"tags": {},
"tags_all": {}
},
"sensitive_attributes": [],
@@ -2038,7 +2038,7 @@
"placement_constraint": [],
"platform_version": "",
"propagate_tags": "TASK_DEFINITION",
"tags": null,
"tags": {},
"task_count": 1,
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/square2_import_job_prod:1"
}
@@ -2096,7 +2096,7 @@
],
"revision": 1,
"runtime_platform": [],
"tags": null,
"tags": {},
"tags_all": {},
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
"volume": []
@@ -2390,7 +2390,7 @@
"name_prefix": "",
"role_arn": "",
"schedule_expression": "rate(4 hours)",
"tags": null,
"tags": {},
"tags_all": {}
},
"sensitive_attributes": [],
@@ -2434,7 +2434,7 @@
"placement_constraint": [],
"platform_version": "",
"propagate_tags": "TASK_DEFINITION",
"tags": null,
"tags": {},
"task_count": 1,
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/vendor_usages_prod:1"
}
@@ -2492,7 +2492,7 @@
],
"revision": 1,
"runtime_platform": [],
"tags": null,
"tags": {},
"tags_all": {},
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
"volume": []