From d58e963c927c6a92c9a1da85b045d999efb56c3d Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Fri, 30 Sep 2022 09:40:46 -0700 Subject: [PATCH] fix --- src/clj/auto_ap/server.clj | 2 +- .../prod/terraform.tfstate | 67 ++++++++- .../prod/terraform.tfstate.backup | 129 +----------------- 3 files changed, 70 insertions(+), 128 deletions(-) diff --git a/src/clj/auto_ap/server.clj b/src/clj/auto_ap/server.clj index 3513c431..7c239ec6 100644 --- a/src/clj/auto_ap/server.clj +++ b/src/clj/auto_ap/server.clj @@ -100,7 +100,7 @@ (= job "yodlee2") (job-yodlee2/-main) - (= job "yodlee2_accounts") + (= job "yodlee2-accounts") (job-yodlee2/accounts-only) (= job "plaid") diff --git a/terraform/terraform.tfstate.d/prod/terraform.tfstate b/terraform/terraform.tfstate.d/prod/terraform.tfstate index 223128cf..1bee9e79 100644 --- a/terraform/terraform.tfstate.d/prod/terraform.tfstate +++ b/terraform/terraform.tfstate.d/prod/terraform.tfstate @@ -1,7 +1,7 @@ { "version": 4, "terraform_version": "1.2.7", - "serial": 212, + "serial": 214, "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": 4, + "desired_count": 2, "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:368", + "task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_prod:370", "timeouts": { "delete": null }, @@ -1071,6 +1071,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "arn": "arn:aws:events:us-east-1:679918342773:rule/close-auto-invoices-schedule", @@ -1099,6 +1100,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 1, "attributes": { "arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default", @@ -1203,6 +1205,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "arn": "arn:aws:events:us-east-1:679918342773:rule/current-balance-cache-schedule", @@ -1231,6 +1234,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 1, "attributes": { "arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default", @@ -1335,6 +1339,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "arn": "arn:aws:events:us-east-1:679918342773:rule/import-uploaded-invoices-schedule", @@ -1363,6 +1368,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 1, "attributes": { "arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default", @@ -1467,6 +1473,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "arn": "arn:aws:events:us-east-1:679918342773:rule/intuit-schedule", @@ -1495,6 +1502,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 1, "attributes": { "arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default", @@ -1599,6 +1607,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "arn": "arn:aws:events:us-east-1:679918342773:rule/plaid-schedule", @@ -1627,6 +1636,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 1, "attributes": { "arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default", @@ -1731,6 +1741,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "arn": "arn:aws:events:us-east-1:679918342773:rule/reconcile-ledger-schedule", @@ -1759,6 +1770,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 1, "attributes": { "arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default", @@ -1863,6 +1875,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "arn": "arn:aws:events:us-east-1:679918342773:rule/square2-import-job-schedule", @@ -1891,6 +1904,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 1, "attributes": { "arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default", @@ -1995,6 +2009,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "arn": "arn:aws:events:us-east-1:679918342773:rule/square-import-job-schedule", @@ -2023,6 +2038,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 1, "attributes": { "arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default", @@ -2127,6 +2143,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "arn": "arn:aws:events:us-east-1:679918342773:rule/sysco-schedule", @@ -2155,6 +2172,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 1, "attributes": { "arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default", @@ -2259,6 +2277,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "arn": "arn:aws:events:us-east-1:679918342773:rule/vendor-usages-schedule", @@ -2287,6 +2306,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 1, "attributes": { "arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default", @@ -2383,6 +2403,45 @@ } ] }, + { + "module": "module.yodlee2_accounts_job", + "mode": "managed", + "type": "aws_ecs_task_definition", + "name": "background_taskdef", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/yodlee2_accounts_prod:1", + "container_definitions": "[{\"cpu\":0,\"dockerLabels\":{\"com.datadoghq.tags.env\":\"prod\",\"com.datadoghq.tags.service\":\"yodlee2-accounts\"},\"environment\":[{\"name\":\"DD_CONTAINER_ENV_AS_TAGS\",\"value\":\"{\\\"INTEGREAT_JOB\\\":\\\"background_job\\\"}\"},{\"name\":\"DD_ENV\",\"value\":\"prod\"},{\"name\":\"DD_SERVICE\",\"value\":\"yodlee2-accounts\"},{\"name\":\"INTEGREAT_JOB\",\"value\":\"yodlee2-accounts\"},{\"name\":\"config\",\"value\":\"/usr/local/config/prod-background-worker.edn\"}],\"essential\":true,\"image\":\"679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat:prod\",\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/ecs/integreat-background-worker-prod\",\"awslogs-region\":\"us-east-1\",\"awslogs-stream-prefix\":\"ecs\"}},\"mountPoints\":[],\"name\":\"integreat-app\",\"portMappings\":[{\"containerPort\":9000,\"hostPort\":9000,\"protocol\":\"tcp\"},{\"containerPort\":9090,\"hostPort\":9090,\"protocol\":\"tcp\"}],\"volumesFrom\":[]},{\"cpu\":0,\"environment\":[{\"name\":\"DD_API_KEY\",\"value\":\"ce10d932c47b358e81081ae67bd8c112\"},{\"name\":\"ECS_FARGATE\",\"value\":\"true\"}],\"essential\":true,\"image\":\"public.ecr.aws/datadog/agent:latest\",\"mountPoints\":[],\"name\":\"datadog-agent\",\"portMappings\":[],\"volumesFrom\":[]}]", + "cpu": "512", + "ephemeral_storage": [], + "execution_role_arn": "arn:aws:iam::679918342773:role/ecsTaskExecutionRole", + "family": "yodlee2_accounts_prod", + "id": "yodlee2_accounts_prod", + "inference_accelerator": [], + "ipc_mode": "", + "memory": "1024", + "network_mode": "awsvpc", + "pid_mode": "", + "placement_constraints": [], + "proxy_configuration": [], + "requires_compatibilities": [ + "FARGATE" + ], + "revision": 1, + "runtime_platform": [], + "tags": null, + "tags_all": {}, + "task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb", + "volume": [] + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" + } + ] + }, { "module": "module.yodlee2_job", "mode": "managed", @@ -2391,6 +2450,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 0, "attributes": { "arn": "arn:aws:events:us-east-1:679918342773:rule/yodlee2-schedule", @@ -2419,6 +2479,7 @@ "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", "instances": [ { + "index_key": 0, "schema_version": 1, "attributes": { "arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default", diff --git a/terraform/terraform.tfstate.d/prod/terraform.tfstate.backup b/terraform/terraform.tfstate.d/prod/terraform.tfstate.backup index ed1e0468..223128cf 100644 --- a/terraform/terraform.tfstate.d/prod/terraform.tfstate.backup +++ b/terraform/terraform.tfstate.d/prod/terraform.tfstate.backup @@ -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" }