Made statsd work\?

This commit is contained in:
Bryce Covert
2022-01-04 07:35:00 -08:00
parent 03d0f8257e
commit 07b6e69c26
7 changed files with 474 additions and 133 deletions

View File

@@ -13,6 +13,7 @@
org.slf4j/log4j-over-slf4j]] org.slf4j/log4j-over-slf4j]]
[compojure "1.6.2" :exclusions [ring [compojure "1.6.2" :exclusions [ring
ring/ring-core]] ring/ring-core]]
[com.unbounce/clojure-dogstatsd-client "0.7.0"]
[bidi "2.1.6"] [bidi "2.1.6"]
[ring/ring-defaults "0.3.2" :exclusions [ring ring/ring-core]] [ring/ring-defaults "0.3.2" :exclusions [ring ring/ring-core]]
[mount "0.1.16"] [mount "0.1.16"]

View File

@@ -34,7 +34,8 @@
[com.walmartlabs.lacinia.util :refer [attach-resolvers]] [com.walmartlabs.lacinia.util :refer [attach-resolvers]]
[datomic.api :as d] [datomic.api :as d]
[unilog.context :as lc] [unilog.context :as lc]
[yang.time :refer [time-it]]) [yang.time :refer [time-it]]
[com.unbounce.dogstatsd.core :as statsd])
(:import (:import
(clojure.lang IPersistentMap))) (clojure.lang IPersistentMap)))
@@ -1329,27 +1330,29 @@
([id q] ([id q]
(query id q nil)) (query id q nil))
([id q v] ([id q v]
(lc/with-context {:query q} (statsd/increment "queries")
(log/info "Executing query" q) (statsd/time! [(subs q 0 (min 50 (count q))) {}]
(try (lc/with-context {:query q}
(let [[result time] (time-it (simplify (execute schema q v {:id id})))] (log/info "Executing query" q)
(info-event "Query completed" (try
{:time (:time time) (let [[result time] (time-it (simplify (execute schema q v {:id id})))]
:errors (seq (:errors result))}) (info-event "Query completed"
(when (seq (:errors result)) {:time (:time time)
(throw (ex-info "GraphQL error" {:result result}))) :errors (seq (:errors result))})
result) (when (seq (:errors result))
(throw (ex-info "GraphQL error" {:result result})))
result)
(catch Exception e (catch Exception e
(if-let [v (or (:validation-error (ex-data e)) (if-let [v (or (:validation-error (ex-data e))
(:validation-error (ex-data (.getCause e))))] (:validation-error (ex-data (.getCause e))))]
(do (do
(warn-event "validation error" {:validation-error v (warn-event "validation error" {:validation-error v
:data (ex-data e)}) :data (ex-data e)})
(throw e) (throw e)
#_{:errors [{:message v}]}) #_{:errors [{:message v}]})
(do (do
(error-event "query error" {:error e}) (error-event "query error" {:error e})
(throw e)))))))) (throw e)))))))))

View File

@@ -7,6 +7,7 @@
[auto-ap.background.requests :as requests] [auto-ap.background.requests :as requests]
[auto-ap.background.sysco :as sysco] [auto-ap.background.sysco :as sysco]
[auto-ap.background.vendor :as vendor] [auto-ap.background.vendor :as vendor]
[auto-ap.background.metrics :as metrics]
[auto-ap.square.core :as square] [auto-ap.square.core :as square]
[auto-ap.datomic.migrate :as migrate] [auto-ap.datomic.migrate :as migrate]
[auto-ap.import.yodlee :as yodlee] [auto-ap.import.yodlee :as yodlee]

View File

@@ -1,37 +1,58 @@
[ [
{
"environment": [
{ {
"name": "integreat-app", "name": "config",
"image": "679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat", "value": "/usr/local/config/staging-background-worker.edn"
"portMappings": [ },
{ {
"containerPort": 9000, "name": "which_env",
"hostPort": 9000, "value": "staging"
"protocol": "tcp"
},
{
"containerPort": 9090,
"hostPort": 9090,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "config",
"value": "/usr/local/config/staging-background-worker.edn"
}
],
"mountPoints": [],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/integreat-background-worker-staging",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "ecs"
}
}
} }
] ],
"essential": true,
"image": "679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat:staging",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/integreat-background-worker-staging",
"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": []
},
{
"environment": [
{
"name": "DD_API_KEY",
"value": "ce10d932c47b358e81081ae67bd8c112"
},
{
"name": "ECS_FARGATE",
"value": "true"
},
{
"name": "DD_DOCKER_ENV_AS_TAGS",
"value": "{\"which_env\":\"environment\"}"
}
],
"essential": true,
"image": "public.ecr.aws/datadog/agent:latest",
"name": "datadog-agent"
}
]

View File

@@ -1,35 +1,58 @@
[ [
{
"environment": [
{ {
"name": "integreat-app", "name": "config",
"image": "679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat", "value": "/usr/local/config/staging.edn"
"portMappings": [ },
{ {
"containerPort": 3000, "name": "which_env",
"hostPort": 3000, "value": "staging"
"protocol": "tcp"
},
{
"containerPort": 9000,
"hostPort": 9000,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "config",
"value": "/usr/local/config/staging.edn"
}
],
"mountPoints": [],
"volumesFrom": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/integreat-app-staging",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "ecs"
}
}
} }
] ],
"essential": true,
"image": "679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat:staging",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/integreat-app-staging",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "ecs"
}
},
"mountPoints": [],
"name": "integreat-app",
"portMappings": [
{
"containerPort": 3000,
"hostPort": 3000,
"protocol": "tcp"
},
{
"containerPort": 9000,
"hostPort": 9000,
"protocol": "tcp"
}
],
"volumesFrom": []
},
{
"environment": [
{
"name": "DD_API_KEY",
"value": "ce10d932c47b358e81081ae67bd8c112"
},
{
"name": "ECS_FARGATE",
"value": "true"
},
{
"name": "DD_DOCKER_ENV_AS_TAGS",
"value": "{\"which_env\":\"environment\"}"
}
],
"essential": true,
"image": "public.ecr.aws/datadog/agent:latest",
"name": "datadog-agent"
}
]

View File

@@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "0.14.4", "terraform_version": "0.14.4",
"serial": 84, "serial": 89,
"lineage": "91d10fe0-8033-8778-c202-78d5a81632e8", "lineage": "91d10fe0-8033-8778-c202-78d5a81632e8",
"outputs": { "outputs": {
"aws_access_key_id": { "aws_access_key_id": {
@@ -151,9 +151,9 @@
"registry_arn": "arn:aws:servicediscovery:us-east-1:679918342773:service/srv-nsn252bfk4r6bzpj" "registry_arn": "arn:aws:servicediscovery:us-east-1:679918342773:service/srv-nsn252bfk4r6bzpj"
} }
], ],
"tags": null, "tags": {},
"tags_all": {}, "tags_all": {},
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_staging:81", "task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_staging:97",
"timeouts": { "timeouts": {
"delete": null "delete": null
}, },
@@ -230,9 +230,9 @@
"registry_arn": "arn:aws:servicediscovery:us-east-1:679918342773:service/srv-4cuqgdwqo5acwqtq" "registry_arn": "arn:aws:servicediscovery:us-east-1:679918342773:service/srv-4cuqgdwqo5acwqtq"
} }
], ],
"tags": null, "tags": {},
"tags_all": {}, "tags_all": {},
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_background-worker_staging:1", "task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_background-worker_staging:17",
"timeouts": { "timeouts": {
"delete": null "delete": null
}, },
@@ -256,8 +256,8 @@
{ {
"schema_version": 1, "schema_version": 1,
"attributes": { "attributes": {
"arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_staging:81", "arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_staging:98",
"container_definitions": "[{\"cpu\":0,\"environment\":[{\"name\":\"config\",\"value\":\"/usr/local/config/staging.edn\"}],\"essential\":true,\"image\":\"679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat\",\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/ecs/integreat-app-staging\",\"awslogs-region\":\"us-east-1\",\"awslogs-stream-prefix\":\"ecs\"}},\"mountPoints\":[],\"name\":\"integreat-app\",\"portMappings\":[{\"containerPort\":3000,\"hostPort\":3000,\"protocol\":\"tcp\"},{\"containerPort\":9000,\"hostPort\":9000,\"protocol\":\"tcp\"}],\"volumesFrom\":[]}]", "container_definitions": "[{\"cpu\":0,\"environment\":[{\"name\":\"config\",\"value\":\"/usr/local/config/staging.edn\"},{\"name\":\"which_env\",\"value\":\"staging\"}],\"essential\":true,\"image\":\"679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat:staging\",\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/ecs/integreat-app-staging\",\"awslogs-region\":\"us-east-1\",\"awslogs-stream-prefix\":\"ecs\"}},\"mountPoints\":[],\"name\":\"integreat-app\",\"portMappings\":[{\"containerPort\":3000,\"hostPort\":3000,\"protocol\":\"tcp\"},{\"containerPort\":9000,\"hostPort\":9000,\"protocol\":\"tcp\"}],\"volumesFrom\":[]},{\"cpu\":0,\"environment\":[{\"name\":\"DD_API_KEY\",\"value\":\"ce10d932c47b358e81081ae67bd8c112\"},{\"name\":\"DD_DOCKER_ENV_AS_TAGS\",\"value\":\"{\\\"which_env\\\":\\\"environment\\\"}\"},{\"name\":\"ECS_FARGATE\",\"value\":\"true\"}],\"essential\":true,\"image\":\"public.ecr.aws/datadog/agent:latest\",\"mountPoints\":[],\"name\":\"datadog-agent\",\"portMappings\":[],\"volumesFrom\":[]}]",
"cpu": "2048", "cpu": "2048",
"ephemeral_storage": [], "ephemeral_storage": [],
"execution_role_arn": "arn:aws:iam::679918342773:role/ecsTaskExecutionRole", "execution_role_arn": "arn:aws:iam::679918342773:role/ecsTaskExecutionRole",
@@ -273,7 +273,7 @@
"requires_compatibilities": [ "requires_compatibilities": [
"FARGATE" "FARGATE"
], ],
"revision": 81, "revision": 98,
"runtime_platform": [], "runtime_platform": [],
"tags": null, "tags": null,
"tags_all": {}, "tags_all": {},
@@ -294,8 +294,8 @@
{ {
"schema_version": 1, "schema_version": 1,
"attributes": { "attributes": {
"arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_background-worker_staging:1", "arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_background-worker_staging:18",
"container_definitions": "[{\"cpu\":0,\"environment\":[{\"name\":\"config\",\"value\":\"/usr/local/config/staging-background-worker.edn\"}],\"essential\":true,\"image\":\"679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat\",\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/ecs/integreat-background-worker-staging\",\"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\":[]}]", "container_definitions": "[{\"cpu\":0,\"environment\":[{\"name\":\"config\",\"value\":\"/usr/local/config/staging-background-worker.edn\"},{\"name\":\"which_env\",\"value\":\"staging\"}],\"essential\":true,\"image\":\"679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat:staging\",\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/ecs/integreat-background-worker-staging\",\"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\":\"DD_DOCKER_ENV_AS_TAGS\",\"value\":\"{\\\"which_env\\\":\\\"environment\\\"}\"},{\"name\":\"ECS_FARGATE\",\"value\":\"true\"}],\"essential\":true,\"image\":\"public.ecr.aws/datadog/agent:latest\",\"mountPoints\":[],\"name\":\"datadog-agent\",\"portMappings\":[],\"volumesFrom\":[]}]",
"cpu": "1024", "cpu": "1024",
"ephemeral_storage": [], "ephemeral_storage": [],
"execution_role_arn": "arn:aws:iam::679918342773:role/ecsTaskExecutionRole", "execution_role_arn": "arn:aws:iam::679918342773:role/ecsTaskExecutionRole",
@@ -311,7 +311,7 @@
"requires_compatibilities": [ "requires_compatibilities": [
"FARGATE" "FARGATE"
], ],
"revision": 1, "revision": 18,
"runtime_platform": [], "runtime_platform": [],
"tags": null, "tags": null,
"tags_all": {}, "tags_all": {},
@@ -649,7 +649,10 @@
"sensitive_attributes": [], "sensitive_attributes": [],
"private": "bnVsbA==", "private": "bnVsbA==",
"dependencies": [ "dependencies": [
"aws_lb_listener.https" "aws_acm_certificate.cert",
"aws_lb.integreat_app",
"aws_lb_listener.https",
"aws_lb_target_group.integreat_app"
] ]
} }
] ]
@@ -947,7 +950,7 @@
"id": "srv-4cuqgdwqo5acwqtq", "id": "srv-4cuqgdwqo5acwqtq",
"name": "integreat-background-worker-staging", "name": "integreat-background-worker-staging",
"namespace_id": "ns-gv2z744em7myo2jp", "namespace_id": "ns-gv2z744em7myo2jp",
"tags": null, "tags": {},
"tags_all": {} "tags_all": {}
}, },
"sensitive_attributes": [], "sensitive_attributes": [],
@@ -988,7 +991,7 @@
"id": "srv-nsn252bfk4r6bzpj", "id": "srv-nsn252bfk4r6bzpj",
"name": "integreat-app-staging", "name": "integreat-app-staging",
"namespace_id": "ns-gv2z744em7myo2jp", "namespace_id": "ns-gv2z744em7myo2jp",
"tags": null, "tags": {},
"tags_all": {} "tags_all": {}
}, },
"sensitive_attributes": [], "sensitive_attributes": [],
@@ -1084,7 +1087,7 @@
"receive_wait_time_seconds": 0, "receive_wait_time_seconds": 0,
"redrive_policy": "", "redrive_policy": "",
"sqs_managed_sse_enabled": false, "sqs_managed_sse_enabled": false,
"tags": null, "tags": {},
"tags_all": {}, "tags_all": {},
"url": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-background-request-staging", "url": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-background-request-staging",
"visibility_timeout_seconds": 30 "visibility_timeout_seconds": 30

View File

@@ -1,12 +1,13 @@
{ {
"version": 4, "version": 4,
"terraform_version": "0.14.4", "terraform_version": "0.14.4",
"serial": 70, "serial": 84,
"lineage": "91d10fe0-8033-8778-c202-78d5a81632e8", "lineage": "91d10fe0-8033-8778-c202-78d5a81632e8",
"outputs": { "outputs": {
"aws_access_key_id": { "aws_access_key_id": {
"value": "AKIAJIS67OSJARD2E6VQ", "value": "AKIAJIS67OSJARD2E6VQ",
"type": "string" "type": "string",
"sensitive": true
}, },
"aws_default_region": { "aws_default_region": {
"value": "us-east-1", "value": "us-east-1",
@@ -14,7 +15,8 @@
}, },
"aws_secret_access_key": { "aws_secret_access_key": {
"value": "Z+AOjQU9M4SwKVU2meYtyNxXtz1Axu/9xohvteXf", "value": "Z+AOjQU9M4SwKVU2meYtyNxXtz1Axu/9xohvteXf",
"type": "string" "type": "string",
"sensitive": true
}, },
"queue_url": { "queue_url": {
"value": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-staging", "value": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-staging",
@@ -33,7 +35,7 @@
"attributes": { "attributes": {
"account_id": "679918342773", "account_id": "679918342773",
"arn": "arn:aws:iam::679918342773:user/bryce", "arn": "arn:aws:iam::679918342773:user/bryce",
"id": "2020-09-25 00:21:01.39516 +0000 UTC", "id": "679918342773",
"user_id": "AIDAJPUJFTOKO4IRADMV4" "user_id": "AIDAJPUJFTOKO4IRADMV4"
}, },
"sensitive_attributes": [] "sensitive_attributes": []
@@ -72,6 +74,7 @@
"status": "ISSUED", "status": "ISSUED",
"subject_alternative_names": [], "subject_alternative_names": [],
"tags": {}, "tags": {},
"tags_all": {},
"validation_emails": [], "validation_emails": [],
"validation_method": "DNS" "validation_method": "DNS"
}, },
@@ -91,6 +94,12 @@
"attributes": { "attributes": {
"capacity_provider_strategy": [], "capacity_provider_strategy": [],
"cluster": "arn:aws:ecs:us-east-1:679918342773:cluster/default", "cluster": "arn:aws:ecs:us-east-1:679918342773:cluster/default",
"deployment_circuit_breaker": [
{
"enable": false,
"rollback": false
}
],
"deployment_controller": [ "deployment_controller": [
{ {
"type": "ECS" "type": "ECS"
@@ -100,10 +109,11 @@
"deployment_minimum_healthy_percent": 100, "deployment_minimum_healthy_percent": 100,
"desired_count": 1, "desired_count": 1,
"enable_ecs_managed_tags": false, "enable_ecs_managed_tags": false,
"enable_execute_command": false,
"force_new_deployment": null, "force_new_deployment": null,
"health_check_grace_period_seconds": 600, "health_check_grace_period_seconds": 600,
"iam_role": "aws-service-role", "iam_role": "aws-service-role",
"id": "arn:aws:ecs:us-east-1:679918342773:service/integreat_app_staging", "id": "arn:aws:ecs:us-east-1:679918342773:service/default/integreat_app_staging",
"launch_type": "FARGATE", "launch_type": "FARGATE",
"load_balancer": [ "load_balancer": [
{ {
@@ -138,20 +148,101 @@
"container_name": "", "container_name": "",
"container_port": 0, "container_port": 0,
"port": 0, "port": 0,
"registry_arn": "arn:aws:servicediscovery:us-east-1:679918342773:service/srv-6auj2wqsh55k2nuj" "registry_arn": "arn:aws:servicediscovery:us-east-1:679918342773:service/srv-nsn252bfk4r6bzpj"
} }
], ],
"tags": {}, "tags": null,
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_staging:3", "tags_all": {},
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_staging:81",
"timeouts": { "timeouts": {
"delete": null "delete": null
} },
"wait_for_steady_state": false
}, },
"sensitive_attributes": [], "sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxMjAwMDAwMDAwMDAwfX0=", "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxMjAwMDAwMDAwMDAwfX0=",
"dependencies": [ "dependencies": [
"aws_ecs_task_definition.integreat_app", "aws_ecs_task_definition.integreat_app",
"aws_lb_target_group.integreat_app" "aws_lb_target_group.integreat_app",
"aws_service_discovery_service.service"
]
}
]
},
{
"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_staging",
"launch_type": "FARGATE",
"load_balancer": [],
"name": "integreat_background_worker_staging",
"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-4cuqgdwqo5acwqtq"
}
],
"tags": null,
"tags_all": {},
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_background-worker_staging:1",
"timeouts": {
"delete": null
},
"wait_for_steady_state": false
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxMjAwMDAwMDAwMDAwfX0=",
"dependencies": [
"aws_ecs_task_definition.integreat_background_worker",
"aws_service_discovery_service.background_worker_service"
] ]
} }
] ]
@@ -165,14 +256,53 @@
{ {
"schema_version": 1, "schema_version": 1,
"attributes": { "attributes": {
"arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_staging:3", "arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_staging:81",
"container_definitions": "[{\"cpu\":0,\"environment\":[{\"name\":\"config\",\"value\":\"/usr/local/config/staging.edn\"}],\"essential\":true,\"image\":\"679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat\",\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/ecs/integreat-app\",\"awslogs-region\":\"us-east-1\",\"awslogs-stream-prefix\":\"ecs\"}},\"mountPoints\":[],\"name\":\"integreat-app\",\"portMappings\":[{\"containerPort\":3000,\"hostPort\":3000,\"protocol\":\"tcp\"},{\"containerPort\":9000,\"hostPort\":9000,\"protocol\":\"tcp\"}],\"volumesFrom\":[]}]", "container_definitions": "[{\"cpu\":0,\"environment\":[{\"name\":\"config\",\"value\":\"/usr/local/config/staging.edn\"}],\"essential\":true,\"image\":\"679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat\",\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/ecs/integreat-app-staging\",\"awslogs-region\":\"us-east-1\",\"awslogs-stream-prefix\":\"ecs\"}},\"mountPoints\":[],\"name\":\"integreat-app\",\"portMappings\":[{\"containerPort\":3000,\"hostPort\":3000,\"protocol\":\"tcp\"},{\"containerPort\":9000,\"hostPort\":9000,\"protocol\":\"tcp\"}],\"volumesFrom\":[]}]",
"cpu": "2048", "cpu": "2048",
"ephemeral_storage": [],
"execution_role_arn": "arn:aws:iam::679918342773:role/ecsTaskExecutionRole", "execution_role_arn": "arn:aws:iam::679918342773:role/ecsTaskExecutionRole",
"family": "integreat_app_staging", "family": "integreat_app_staging",
"id": "integreat_app_staging", "id": "integreat_app_staging",
"inference_accelerator": [], "inference_accelerator": [],
"ipc_mode": "", "ipc_mode": "",
"memory": "8192",
"network_mode": "awsvpc",
"pid_mode": "",
"placement_constraints": [],
"proxy_configuration": [],
"requires_compatibilities": [
"FARGATE"
],
"revision": 81,
"runtime_platform": [],
"tags": null,
"tags_all": {},
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
"volume": []
},
"sensitive_attributes": [],
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ=="
}
]
},
{
"mode": "managed",
"type": "aws_ecs_task_definition",
"name": "integreat_background_worker",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 1,
"attributes": {
"arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_background-worker_staging:1",
"container_definitions": "[{\"cpu\":0,\"environment\":[{\"name\":\"config\",\"value\":\"/usr/local/config/staging-background-worker.edn\"}],\"essential\":true,\"image\":\"679918342773.dkr.ecr.us-east-1.amazonaws.com/integreat\",\"logConfiguration\":{\"logDriver\":\"awslogs\",\"options\":{\"awslogs-group\":\"/ecs/integreat-background-worker-staging\",\"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": "1024",
"ephemeral_storage": [],
"execution_role_arn": "arn:aws:iam::679918342773:role/ecsTaskExecutionRole",
"family": "integreat_background-worker_staging",
"id": "integreat_background-worker_staging",
"inference_accelerator": [],
"ipc_mode": "",
"memory": "4096", "memory": "4096",
"network_mode": "awsvpc", "network_mode": "awsvpc",
"pid_mode": "", "pid_mode": "",
@@ -181,8 +311,10 @@
"requires_compatibilities": [ "requires_compatibilities": [
"FARGATE" "FARGATE"
], ],
"revision": 3, "revision": 1,
"tags": {}, "runtime_platform": [],
"tags": null,
"tags_all": {},
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb", "task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
"volume": [] "volume": []
}, },
@@ -200,7 +332,9 @@
{ {
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"create_date": "2018-04-08T22:09:45Z",
"encrypted_secret": null, "encrypted_secret": null,
"encrypted_ses_smtp_password_v4": null,
"id": "AKIAJIS67OSJARD2E6VQ", "id": "AKIAJIS67OSJARD2E6VQ",
"key_fingerprint": null, "key_fingerprint": null,
"pgp_key": null, "pgp_key": null,
@@ -232,6 +366,7 @@
"path": "/", "path": "/",
"permissions_boundary": null, "permissions_boundary": null,
"tags": {}, "tags": {},
"tags_all": {},
"unique_id": "AIDAJ4KJ7STJZNLIN3M6S" "unique_id": "AIDAJ4KJ7STJZNLIN3M6S"
}, },
"sensitive_attributes": [] "sensitive_attributes": []
@@ -276,13 +411,16 @@
], ],
"arn": "arn:aws:elasticloadbalancing:us-east-1:679918342773:loadbalancer/app/integreat-app-staging/dc040205e561419e", "arn": "arn:aws:elasticloadbalancing:us-east-1:679918342773:loadbalancer/app/integreat-app-staging/dc040205e561419e",
"arn_suffix": "app/integreat-app-staging/dc040205e561419e", "arn_suffix": "app/integreat-app-staging/dc040205e561419e",
"customer_owned_ipv4_pool": "",
"desync_mitigation_mode": "defensive",
"dns_name": "integreat-app-staging-229185591.us-east-1.elb.amazonaws.com", "dns_name": "integreat-app-staging-229185591.us-east-1.elb.amazonaws.com",
"drop_invalid_header_fields": false, "drop_invalid_header_fields": false,
"enable_cross_zone_load_balancing": null, "enable_cross_zone_load_balancing": null,
"enable_deletion_protection": true, "enable_deletion_protection": true,
"enable_http2": true, "enable_http2": true,
"enable_waf_fail_open": false,
"id": "arn:aws:elasticloadbalancing:us-east-1:679918342773:loadbalancer/app/integreat-app-staging/dc040205e561419e", "id": "arn:aws:elasticloadbalancing:us-east-1:679918342773:loadbalancer/app/integreat-app-staging/dc040205e561419e",
"idle_timeout": 60, "idle_timeout": 120,
"internal": false, "internal": false,
"ip_address_type": "ipv4", "ip_address_type": "ipv4",
"load_balancer_type": "application", "load_balancer_type": "application",
@@ -294,31 +432,43 @@
"subnet_mapping": [ "subnet_mapping": [
{ {
"allocation_id": "", "allocation_id": "",
"ipv6_address": "",
"outpost_id": "",
"private_ipv4_address": "", "private_ipv4_address": "",
"subnet_id": "subnet-16161a39" "subnet_id": "subnet-16161a39"
}, },
{ {
"allocation_id": "", "allocation_id": "",
"ipv6_address": "",
"outpost_id": "",
"private_ipv4_address": "", "private_ipv4_address": "",
"subnet_id": "subnet-323deb78" "subnet_id": "subnet-323deb78"
}, },
{ {
"allocation_id": "", "allocation_id": "",
"ipv6_address": "",
"outpost_id": "",
"private_ipv4_address": "", "private_ipv4_address": "",
"subnet_id": "subnet-44c2774b" "subnet_id": "subnet-44c2774b"
}, },
{ {
"allocation_id": "", "allocation_id": "",
"ipv6_address": "",
"outpost_id": "",
"private_ipv4_address": "", "private_ipv4_address": "",
"subnet_id": "subnet-5e675761" "subnet_id": "subnet-5e675761"
}, },
{ {
"allocation_id": "", "allocation_id": "",
"ipv6_address": "",
"outpost_id": "",
"private_ipv4_address": "", "private_ipv4_address": "",
"subnet_id": "subnet-8519fde2" "subnet_id": "subnet-8519fde2"
}, },
{ {
"allocation_id": "", "allocation_id": "",
"ipv6_address": "",
"outpost_id": "",
"private_ipv4_address": "", "private_ipv4_address": "",
"subnet_id": "subnet-89bab8d4" "subnet_id": "subnet-89bab8d4"
} }
@@ -332,6 +482,7 @@
"subnet-89bab8d4" "subnet-89bab8d4"
], ],
"tags": {}, "tags": {},
"tags_all": {},
"timeouts": null, "timeouts": null,
"vpc_id": "vpc-b5b7d6ce", "vpc_id": "vpc-b5b7d6ce",
"zone_id": "Z35SXDOTRQ7X7K" "zone_id": "Z35SXDOTRQ7X7K"
@@ -350,6 +501,7 @@
{ {
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"alpn_policy": null,
"arn": "arn:aws:elasticloadbalancing:us-east-1:679918342773:listener/app/integreat-app-staging/dc040205e561419e/8e5542063f461bb4", "arn": "arn:aws:elasticloadbalancing:us-east-1:679918342773:listener/app/integreat-app-staging/dc040205e561419e/8e5542063f461bb4",
"certificate_arn": null, "certificate_arn": null,
"default_action": [ "default_action": [
@@ -378,6 +530,8 @@
"port": 80, "port": 80,
"protocol": "HTTP", "protocol": "HTTP",
"ssl_policy": "", "ssl_policy": "",
"tags": {},
"tags_all": {},
"timeouts": { "timeouts": {
"read": null "read": null
} }
@@ -399,6 +553,7 @@
{ {
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"alpn_policy": null,
"arn": "arn:aws:elasticloadbalancing:us-east-1:679918342773:listener/app/integreat-app-staging/dc040205e561419e/b89075bc6a559a4f", "arn": "arn:aws:elasticloadbalancing:us-east-1:679918342773:listener/app/integreat-app-staging/dc040205e561419e/b89075bc6a559a4f",
"certificate_arn": "arn:aws:acm:us-east-1:679918342773:certificate/eec88d2f-93c4-4e7e-a167-e75d853f0759", "certificate_arn": "arn:aws:acm:us-east-1:679918342773:certificate/eec88d2f-93c4-4e7e-a167-e75d853f0759",
"default_action": [ "default_action": [
@@ -418,6 +573,8 @@
"port": 443, "port": 443,
"protocol": "HTTPS", "protocol": "HTTPS",
"ssl_policy": "ELBSecurityPolicy-2016-08", "ssl_policy": "ELBSecurityPolicy-2016-08",
"tags": {},
"tags_all": {},
"timeouts": { "timeouts": {
"read": null "read": null
} }
@@ -474,7 +631,7 @@
"/css/*", "/css/*",
"/finance-font/*", "/finance-font/*",
"/img/*", "/img/*",
"/js/compiled/app.js", "/js/compiled/*",
"index.html" "index.html"
] ]
} }
@@ -485,15 +642,14 @@
], ],
"id": "arn:aws:elasticloadbalancing:us-east-1:679918342773:listener-rule/app/integreat-app-staging/dc040205e561419e/b89075bc6a559a4f/8bc88fa379868c55", "id": "arn:aws:elasticloadbalancing:us-east-1:679918342773:listener-rule/app/integreat-app-staging/dc040205e561419e/b89075bc6a559a4f/8bc88fa379868c55",
"listener_arn": "arn:aws:elasticloadbalancing:us-east-1:679918342773:listener/app/integreat-app-staging/dc040205e561419e/b89075bc6a559a4f", "listener_arn": "arn:aws:elasticloadbalancing:us-east-1:679918342773:listener/app/integreat-app-staging/dc040205e561419e/b89075bc6a559a4f",
"priority": 1 "priority": 1,
"tags": {},
"tags_all": {}
}, },
"sensitive_attributes": [], "sensitive_attributes": [],
"private": "bnVsbA==", "private": "bnVsbA==",
"dependencies": [ "dependencies": [
"aws_acm_certificate.cert", "aws_lb_listener.https"
"aws_lb.integreat_app",
"aws_lb_listener.https",
"aws_lb_target_group.integreat_app"
] ]
} }
] ]
@@ -509,7 +665,8 @@
"attributes": { "attributes": {
"arn": "arn:aws:elasticloadbalancing:us-east-1:679918342773:targetgroup/integreat-app-staging/34af39c4c46e7ce1", "arn": "arn:aws:elasticloadbalancing:us-east-1:679918342773:targetgroup/integreat-app-staging/34af39c4c46e7ce1",
"arn_suffix": "targetgroup/integreat-app-staging/34af39c4c46e7ce1", "arn_suffix": "targetgroup/integreat-app-staging/34af39c4c46e7ce1",
"deregistration_delay": 120, "connection_termination": false,
"deregistration_delay": "120",
"health_check": [ "health_check": [
{ {
"enabled": true, "enabled": true,
@@ -519,8 +676,8 @@
"path": "/api/health-check", "path": "/api/health-check",
"port": "traffic-port", "port": "traffic-port",
"protocol": "HTTP", "protocol": "HTTP",
"timeout": 5, "timeout": 14,
"unhealthy_threshold": 2 "unhealthy_threshold": 5
} }
], ],
"id": "arn:aws:elasticloadbalancing:us-east-1:679918342773:targetgroup/integreat-app-staging/34af39c4c46e7ce1", "id": "arn:aws:elasticloadbalancing:us-east-1:679918342773:targetgroup/integreat-app-staging/34af39c4c46e7ce1",
@@ -529,17 +686,21 @@
"name": "integreat-app-staging", "name": "integreat-app-staging",
"name_prefix": null, "name_prefix": null,
"port": 80, "port": 80,
"preserve_client_ip": null,
"protocol": "HTTP", "protocol": "HTTP",
"protocol_version": "HTTP1",
"proxy_protocol_v2": false, "proxy_protocol_v2": false,
"slow_start": 0, "slow_start": 0,
"stickiness": [ "stickiness": [
{ {
"cookie_duration": 86400, "cookie_duration": 86400,
"cookie_name": "",
"enabled": false, "enabled": false,
"type": "lb_cookie" "type": "lb_cookie"
} }
], ],
"tags": {}, "tags": {},
"tags_all": {},
"target_type": "ip", "target_type": "ip",
"vpc_id": "vpc-b5b7d6ce" "vpc_id": "vpc-b5b7d6ce"
}, },
@@ -572,12 +733,13 @@
"lifecycle_rule": [], "lifecycle_rule": [],
"logging": [], "logging": [],
"object_lock_configuration": [], "object_lock_configuration": [],
"policy": "{\"Id\":\"Policy1526084187222\",\"Statement\":[{\"Action\":\"s3:GetObject\",\"Effect\":\"Allow\",\"Principal\":\"*\",\"Resource\":\"arn:aws:s3:::data.staging.app.integreatconsult.com/*\",\"Sid\":\"Stmt1526084185514\"}],\"Version\":\"2012-10-17\"}", "policy": "{\"Id\":\"Policy1526084187222\",\"Statement\":[{\"Action\":[\"s3:GetObject\"],\"Effect\":\"Allow\",\"Principal\":\"*\",\"Resource\":\"arn:aws:s3:::data.staging.app.integreatconsult.com/*\",\"Sid\":\"Stmt1526084185514\"},{\"Action\":\"s3:*\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::679918342773:role/datomic-ddb\"},\"Resource\":\"arn:aws:s3:::data.staging.app.integreatconsult.com\",\"Sid\":\"AllowReadForProd\"}],\"Version\":\"2012-10-17\"}",
"region": "us-east-1", "region": "us-east-1",
"replication_configuration": [], "replication_configuration": [],
"request_payer": "BucketOwner", "request_payer": "BucketOwner",
"server_side_encryption_configuration": [], "server_side_encryption_configuration": [],
"tags": {}, "tags": {},
"tags_all": {},
"versioning": [ "versioning": [
{ {
"enabled": false, "enabled": false,
@@ -630,6 +792,7 @@
"request_payer": "BucketOwner", "request_payer": "BucketOwner",
"server_side_encryption_configuration": [], "server_side_encryption_configuration": [],
"tags": {}, "tags": {},
"tags_all": {},
"versioning": [ "versioning": [
{ {
"enabled": false, "enabled": false,
@@ -694,6 +857,7 @@
"request_payer": "BucketOwner", "request_payer": "BucketOwner",
"server_side_encryption_configuration": [], "server_side_encryption_configuration": [],
"tags": {}, "tags": {},
"tags_all": {},
"versioning": [ "versioning": [
{ {
"enabled": false, "enabled": false,
@@ -750,6 +914,88 @@
} }
] ]
}, },
{
"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-4cuqgdwqo5acwqtq",
"description": "",
"dns_config": [
{
"dns_records": [
{
"ttl": 10,
"type": "A"
}
],
"namespace_id": "ns-gv2z744em7myo2jp",
"routing_policy": "MULTIVALUE"
}
],
"force_destroy": false,
"health_check_config": [],
"health_check_custom_config": [
{
"failure_threshold": 1
}
],
"id": "srv-4cuqgdwqo5acwqtq",
"name": "integreat-background-worker-staging",
"namespace_id": "ns-gv2z744em7myo2jp",
"tags": null,
"tags_all": {}
},
"sensitive_attributes": [],
"private": "bnVsbA=="
}
]
},
{
"mode": "managed",
"type": "aws_service_discovery_service",
"name": "service",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:servicediscovery:us-east-1:679918342773:service/srv-nsn252bfk4r6bzpj",
"description": "",
"dns_config": [
{
"dns_records": [
{
"ttl": 10,
"type": "A"
}
],
"namespace_id": "ns-gv2z744em7myo2jp",
"routing_policy": "MULTIVALUE"
}
],
"force_destroy": false,
"health_check_config": [],
"health_check_custom_config": [
{
"failure_threshold": 1
}
],
"id": "srv-nsn252bfk4r6bzpj",
"name": "integreat-app-staging",
"namespace_id": "ns-gv2z744em7myo2jp",
"tags": null,
"tags_all": {}
},
"sensitive_attributes": [],
"private": "bnVsbA=="
}
]
},
{ {
"mode": "managed", "mode": "managed",
"type": "aws_ses_receipt_rule", "type": "aws_ses_receipt_rule",
@@ -761,6 +1007,7 @@
"attributes": { "attributes": {
"add_header_action": [], "add_header_action": [],
"after": null, "after": null,
"arn": "arn:aws:ses:us-east-1:679918342773:receipt-rule-set/default-rule-set:receipt-rule/store-staging",
"bounce_action": [], "bounce_action": [],
"enabled": true, "enabled": true,
"id": "store-staging", "id": "store-staging",
@@ -803,6 +1050,7 @@
{ {
"schema_version": 0, "schema_version": 0,
"attributes": { "attributes": {
"arn": "arn:aws:ses:us-east-1:679918342773:receipt-rule-set/default-rule-set",
"id": "default-rule-set", "id": "default-rule-set",
"rule_set_name": "default-rule-set" "rule_set_name": "default-rule-set"
}, },
@@ -810,6 +1058,42 @@
} }
] ]
}, },
{
"mode": "managed",
"type": "aws_sqs_queue",
"name": "background-request",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:sqs:us-east-1:679918342773:integreat-background-request-staging",
"content_based_deduplication": false,
"deduplication_scope": "",
"delay_seconds": 0,
"fifo_queue": false,
"fifo_throughput_limit": "",
"id": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-background-request-staging",
"kms_data_key_reuse_period_seconds": 300,
"kms_master_key_id": "",
"max_message_size": 262144,
"message_retention_seconds": 345600,
"name": "integreat-background-request-staging",
"name_prefix": "",
"policy": "{\"Statement\":[{\"Action\":\"sqs:*\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::679918342773:role/datomic-ddb\"},\"Resource\":\"arn:aws:sqs:*:*:integreat-background-request-staging\"}],\"Version\":\"2012-10-17\"}",
"receive_wait_time_seconds": 0,
"redrive_policy": "",
"sqs_managed_sse_enabled": false,
"tags": null,
"tags_all": {},
"url": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-background-request-staging",
"visibility_timeout_seconds": 30
},
"sensitive_attributes": [],
"private": "bnVsbA=="
}
]
},
{ {
"mode": "managed", "mode": "managed",
"type": "aws_sqs_queue", "type": "aws_sqs_queue",
@@ -821,19 +1105,24 @@
"attributes": { "attributes": {
"arn": "arn:aws:sqs:us-east-1:679918342773:integreat-mail-staging", "arn": "arn:aws:sqs:us-east-1:679918342773:integreat-mail-staging",
"content_based_deduplication": false, "content_based_deduplication": false,
"deduplication_scope": "",
"delay_seconds": 0, "delay_seconds": 0,
"fifo_queue": false, "fifo_queue": false,
"fifo_throughput_limit": "",
"id": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-staging", "id": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-staging",
"kms_data_key_reuse_period_seconds": 300, "kms_data_key_reuse_period_seconds": 300,
"kms_master_key_id": "", "kms_master_key_id": "",
"max_message_size": 262144, "max_message_size": 262144,
"message_retention_seconds": 345600, "message_retention_seconds": 345600,
"name": "integreat-mail-staging", "name": "integreat-mail-staging",
"name_prefix": null, "name_prefix": "",
"policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"sqs:SendMessage\",\"Resource\":\"arn:aws:sqs:*:*:integreat-mail-staging\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"arn:aws:s3:::integreat-mail-staging\"}}}]}", "policy": "{\"Statement\":[{\"Action\":\"sqs:SendMessage\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"arn:aws:s3:::integreat-mail-staging\"}},\"Effect\":\"Allow\",\"Principal\":\"*\",\"Resource\":\"arn:aws:sqs:*:*:integreat-mail-staging\"}],\"Version\":\"2012-10-17\"}",
"receive_wait_time_seconds": 0, "receive_wait_time_seconds": 0,
"redrive_policy": "", "redrive_policy": "",
"sqs_managed_sse_enabled": false,
"tags": {}, "tags": {},
"tags_all": {},
"url": "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-staging",
"visibility_timeout_seconds": 30 "visibility_timeout_seconds": 30
}, },
"sensitive_attributes": [], "sensitive_attributes": [],