addressing failures.
This commit is contained in:
@@ -1,40 +0,0 @@
|
|||||||
(ns auto-ap.background.requests
|
|
||||||
(:require
|
|
||||||
[amazonica.aws.sqs :as sqs]
|
|
||||||
[auto-ap.import.intuit :as i]
|
|
||||||
[auto-ap.import.plaid :as p]
|
|
||||||
[auto-ap.import.yodlee2 :as y2]
|
|
||||||
[auto-ap.utils :refer [heartbeat]]
|
|
||||||
[clojure.tools.logging :as log]
|
|
||||||
[config.core :refer [env]]
|
|
||||||
[mount.core :as mount]
|
|
||||||
[yang.scheduler :as scheduler]))
|
|
||||||
|
|
||||||
(def queue-url (:requests-queue-url env))
|
|
||||||
|
|
||||||
(defn process-1 []
|
|
||||||
(let [[{:keys [message-id receipt-handle body]}] (:messages (sqs/receive-message {:queue-url queue-url
|
|
||||||
:wait-time-seconds 1
|
|
||||||
:count 1}))]
|
|
||||||
(when message-id
|
|
||||||
(sqs/delete-message {:queue-url queue-url
|
|
||||||
:receipt-handle receipt-handle} )
|
|
||||||
(log/infof "processing message %s with body %s" message-id body )
|
|
||||||
(cond
|
|
||||||
(= ":intuit" body)
|
|
||||||
(i/import-intuit)
|
|
||||||
|
|
||||||
(= ":yodlee2" body)
|
|
||||||
(y2/import-yodlee2)
|
|
||||||
|
|
||||||
(= ":plaid" body)
|
|
||||||
(p/import-plaid)))))
|
|
||||||
|
|
||||||
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}
|
|
||||||
(defn fake-message []
|
|
||||||
(sqs/send-message {:queue-url (:requests-queue-url env)
|
|
||||||
:message-body ":intuit"} ))
|
|
||||||
|
|
||||||
(mount/defstate request-listener
|
|
||||||
:start (scheduler/every (* 1000 30) (heartbeat process-1 "request-poller"))
|
|
||||||
:stop (scheduler/stop request-listener))
|
|
||||||
@@ -1,11 +1,39 @@
|
|||||||
(ns auto-ap.graphql.requests
|
(ns auto-ap.graphql.requests
|
||||||
(:require
|
(:require
|
||||||
[amazonica.aws.sqs :as sqs]
|
[amazonica.aws.ecs :as ecs]
|
||||||
[auto-ap.graphql.utils :refer [assert-admin]]
|
[auto-ap.graphql.utils :refer [assert-admin assert-failure]]
|
||||||
[config.core :refer [env]]))
|
[clojure.string :as str]
|
||||||
|
[config.core :refer [env]])
|
||||||
|
(:import
|
||||||
|
(com.amazonaws.services.ecs.model AssignPublicIp)))
|
||||||
|
|
||||||
|
(defn currently-running-jobs []
|
||||||
|
(->> (ecs/list-tasks :cluster "default" )
|
||||||
|
:task-arns
|
||||||
|
(ecs/describe-tasks :include [] :tasks)
|
||||||
|
:tasks
|
||||||
|
#_(filter #(= "RUNNING" (:last-status %)))
|
||||||
|
(map (comp (comp last butlast) #(str/split % #"[/:]") :task-definition-arn)
|
||||||
|
|
||||||
|
#_(mapcat (comp :container-overrides :overrides)))
|
||||||
|
(set))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
(defn run-task [task]
|
||||||
|
(ecs/run-task :capacity-provider-strategy [{:base 1 :weight 1 :capacity-provider "FARGATE_SPOT"}]
|
||||||
|
:count 1
|
||||||
|
:cluster "default"
|
||||||
|
:enable-ecs-managed-tags true
|
||||||
|
:task-definition task
|
||||||
|
:network-configuration {:aws-vpc-configuration {:subnets ["subnet-5e675761" "subnet-8519fde2" "subnet-89bab8d4"]
|
||||||
|
:security-groups ["sg-004e5855310c453a3" "sg-02d167406b1082698"]
|
||||||
|
:assign-public-ip AssignPublicIp/ENABLED}}))
|
||||||
|
|
||||||
(defn request-import [context value _]
|
(defn request-import [context value _]
|
||||||
(assert-admin (:id context))
|
(assert-admin (:id context))
|
||||||
(:message-id (sqs/send-message {:queue-url (:requests-queue-url env)
|
(let [job (str (str/replace (name (:which value)) #"-" "_") "_" (:dd-env env))]
|
||||||
:message-body (:which value)} )))
|
(if (not (get (currently-running-jobs) job))
|
||||||
|
(run-task job)
|
||||||
|
(assert-failure "This job is already running"))))
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
(ns auto-ap.server
|
(ns auto-ap.server
|
||||||
(:gen-class)
|
(:gen-class)
|
||||||
(:require
|
(:require
|
||||||
[auto-ap.background.requests :as requests]
|
|
||||||
[auto-ap.datomic.migrate :as migrate]
|
[auto-ap.datomic.migrate :as migrate]
|
||||||
[auto-ap.handler :refer [app]]
|
[auto-ap.handler :refer [app]]
|
||||||
[auto-ap.jobs.close-auto-invoices :as job-close-auto-invoices]
|
[auto-ap.jobs.close-auto-invoices :as job-close-auto-invoices]
|
||||||
@@ -124,7 +123,6 @@
|
|||||||
(not (env :run-web? )) (into [#'jetty
|
(not (env :run-web? )) (into [#'jetty
|
||||||
#'jetty-stats])
|
#'jetty-stats])
|
||||||
(not (env :run-background?)) (into [#'ledger/process-txes-worker
|
(not (env :run-background?)) (into [#'ledger/process-txes-worker
|
||||||
#'requests/request-listener
|
|
||||||
#'migrate/migrate-start]))]
|
#'migrate/migrate-start]))]
|
||||||
(log/info "starting without " without)
|
(log/info "starting without " without)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": 4,
|
"version": 4,
|
||||||
"terraform_version": "1.2.7",
|
"terraform_version": "1.2.7",
|
||||||
"serial": 205,
|
"serial": 208,
|
||||||
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
||||||
"outputs": {
|
"outputs": {
|
||||||
"aws_access_key_id": {
|
"aws_access_key_id": {
|
||||||
@@ -1730,7 +1730,7 @@
|
|||||||
"name_prefix": "",
|
"name_prefix": "",
|
||||||
"role_arn": "",
|
"role_arn": "",
|
||||||
"schedule_expression": "rate(6 hours)",
|
"schedule_expression": "rate(6 hours)",
|
||||||
"tags": {},
|
"tags": null,
|
||||||
"tags_all": {}
|
"tags_all": {}
|
||||||
},
|
},
|
||||||
"sensitive_attributes": [],
|
"sensitive_attributes": [],
|
||||||
@@ -1774,7 +1774,7 @@
|
|||||||
"placement_constraint": [],
|
"placement_constraint": [],
|
||||||
"platform_version": "",
|
"platform_version": "",
|
||||||
"propagate_tags": "TASK_DEFINITION",
|
"propagate_tags": "TASK_DEFINITION",
|
||||||
"tags": {},
|
"tags": null,
|
||||||
"task_count": 1,
|
"task_count": 1,
|
||||||
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/plaid_prod:1"
|
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/plaid_prod:1"
|
||||||
}
|
}
|
||||||
@@ -1994,7 +1994,7 @@
|
|||||||
"name_prefix": "",
|
"name_prefix": "",
|
||||||
"role_arn": "",
|
"role_arn": "",
|
||||||
"schedule_expression": "rate(5 hours)",
|
"schedule_expression": "rate(5 hours)",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {}
|
"tags_all": {}
|
||||||
},
|
},
|
||||||
"sensitive_attributes": [],
|
"sensitive_attributes": [],
|
||||||
@@ -2038,7 +2038,7 @@
|
|||||||
"placement_constraint": [],
|
"placement_constraint": [],
|
||||||
"platform_version": "",
|
"platform_version": "",
|
||||||
"propagate_tags": "TASK_DEFINITION",
|
"propagate_tags": "TASK_DEFINITION",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"task_count": 1,
|
"task_count": 1,
|
||||||
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/square2_import_job_prod:1"
|
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/square2_import_job_prod:1"
|
||||||
}
|
}
|
||||||
@@ -2096,7 +2096,7 @@
|
|||||||
],
|
],
|
||||||
"revision": 1,
|
"revision": 1,
|
||||||
"runtime_platform": [],
|
"runtime_platform": [],
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
"volume": []
|
"volume": []
|
||||||
@@ -2390,7 +2390,7 @@
|
|||||||
"name_prefix": "",
|
"name_prefix": "",
|
||||||
"role_arn": "",
|
"role_arn": "",
|
||||||
"schedule_expression": "rate(4 hours)",
|
"schedule_expression": "rate(4 hours)",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {}
|
"tags_all": {}
|
||||||
},
|
},
|
||||||
"sensitive_attributes": [],
|
"sensitive_attributes": [],
|
||||||
@@ -2434,7 +2434,7 @@
|
|||||||
"placement_constraint": [],
|
"placement_constraint": [],
|
||||||
"platform_version": "",
|
"platform_version": "",
|
||||||
"propagate_tags": "TASK_DEFINITION",
|
"propagate_tags": "TASK_DEFINITION",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"task_count": 1,
|
"task_count": 1,
|
||||||
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/vendor_usages_prod:1"
|
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/vendor_usages_prod:1"
|
||||||
}
|
}
|
||||||
@@ -2492,7 +2492,7 @@
|
|||||||
],
|
],
|
||||||
"revision": 1,
|
"revision": 1,
|
||||||
"runtime_platform": [],
|
"runtime_platform": [],
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
"volume": []
|
"volume": []
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"version": 4,
|
"version": 4,
|
||||||
"terraform_version": "1.2.7",
|
"terraform_version": "1.2.7",
|
||||||
"serial": 194,
|
"serial": 205,
|
||||||
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
||||||
"outputs": {
|
"outputs": {
|
||||||
"aws_access_key_id": {
|
"aws_access_key_id": {
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
],
|
],
|
||||||
"tags": {},
|
"tags": {},
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_prod:362",
|
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_app_prod:365",
|
||||||
"timeouts": {
|
"timeouts": {
|
||||||
"delete": null
|
"delete": null
|
||||||
},
|
},
|
||||||
@@ -243,7 +243,7 @@
|
|||||||
],
|
],
|
||||||
"tags": {},
|
"tags": {},
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_background-worker_prod:340",
|
"task_definition": "arn:aws:ecs:us-east-1:679918342773:task-definition/integreat_background-worker_prod:344",
|
||||||
"timeouts": {
|
"timeouts": {
|
||||||
"delete": null
|
"delete": null
|
||||||
},
|
},
|
||||||
@@ -324,7 +324,7 @@
|
|||||||
],
|
],
|
||||||
"revision": 341,
|
"revision": 341,
|
||||||
"runtime_platform": [],
|
"runtime_platform": [],
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
"volume": []
|
"volume": []
|
||||||
@@ -1202,7 +1202,7 @@
|
|||||||
"name_prefix": "",
|
"name_prefix": "",
|
||||||
"role_arn": "",
|
"role_arn": "",
|
||||||
"schedule_expression": "rate(1 hour)",
|
"schedule_expression": "rate(1 hour)",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {}
|
"tags_all": {}
|
||||||
},
|
},
|
||||||
"sensitive_attributes": [],
|
"sensitive_attributes": [],
|
||||||
@@ -1246,7 +1246,7 @@
|
|||||||
"placement_constraint": [],
|
"placement_constraint": [],
|
||||||
"platform_version": "",
|
"platform_version": "",
|
||||||
"propagate_tags": "TASK_DEFINITION",
|
"propagate_tags": "TASK_DEFINITION",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"task_count": 1,
|
"task_count": 1,
|
||||||
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/close_auto_invoices_prod:1"
|
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/close_auto_invoices_prod:1"
|
||||||
}
|
}
|
||||||
@@ -1304,7 +1304,7 @@
|
|||||||
],
|
],
|
||||||
"revision": 1,
|
"revision": 1,
|
||||||
"runtime_platform": [],
|
"runtime_platform": [],
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
"volume": []
|
"volume": []
|
||||||
@@ -1466,7 +1466,7 @@
|
|||||||
"name_prefix": "",
|
"name_prefix": "",
|
||||||
"role_arn": "",
|
"role_arn": "",
|
||||||
"schedule_expression": "rate(1 hour)",
|
"schedule_expression": "rate(1 hour)",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {}
|
"tags_all": {}
|
||||||
},
|
},
|
||||||
"sensitive_attributes": [],
|
"sensitive_attributes": [],
|
||||||
@@ -1510,7 +1510,7 @@
|
|||||||
"placement_constraint": [],
|
"placement_constraint": [],
|
||||||
"platform_version": "",
|
"platform_version": "",
|
||||||
"propagate_tags": "TASK_DEFINITION",
|
"propagate_tags": "TASK_DEFINITION",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"task_count": 1,
|
"task_count": 1,
|
||||||
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/import_uploaded_invoices_prod:1"
|
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/import_uploaded_invoices_prod:1"
|
||||||
}
|
}
|
||||||
@@ -1568,7 +1568,7 @@
|
|||||||
],
|
],
|
||||||
"revision": 1,
|
"revision": 1,
|
||||||
"runtime_platform": [],
|
"runtime_platform": [],
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
"volume": []
|
"volume": []
|
||||||
@@ -1598,7 +1598,7 @@
|
|||||||
"name_prefix": "",
|
"name_prefix": "",
|
||||||
"role_arn": "",
|
"role_arn": "",
|
||||||
"schedule_expression": "rate(6 hours)",
|
"schedule_expression": "rate(6 hours)",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {}
|
"tags_all": {}
|
||||||
},
|
},
|
||||||
"sensitive_attributes": [],
|
"sensitive_attributes": [],
|
||||||
@@ -1642,7 +1642,7 @@
|
|||||||
"placement_constraint": [],
|
"placement_constraint": [],
|
||||||
"platform_version": "",
|
"platform_version": "",
|
||||||
"propagate_tags": "TASK_DEFINITION",
|
"propagate_tags": "TASK_DEFINITION",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"task_count": 1,
|
"task_count": 1,
|
||||||
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/intuit_prod:1"
|
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/intuit_prod:1"
|
||||||
}
|
}
|
||||||
@@ -1700,7 +1700,7 @@
|
|||||||
],
|
],
|
||||||
"revision": 1,
|
"revision": 1,
|
||||||
"runtime_platform": [],
|
"runtime_platform": [],
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
"volume": []
|
"volume": []
|
||||||
@@ -1730,7 +1730,7 @@
|
|||||||
"name_prefix": "",
|
"name_prefix": "",
|
||||||
"role_arn": "",
|
"role_arn": "",
|
||||||
"schedule_expression": "rate(6 hours)",
|
"schedule_expression": "rate(6 hours)",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {}
|
"tags_all": {}
|
||||||
},
|
},
|
||||||
"sensitive_attributes": [],
|
"sensitive_attributes": [],
|
||||||
@@ -1774,7 +1774,7 @@
|
|||||||
"placement_constraint": [],
|
"placement_constraint": [],
|
||||||
"platform_version": "",
|
"platform_version": "",
|
||||||
"propagate_tags": "TASK_DEFINITION",
|
"propagate_tags": "TASK_DEFINITION",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"task_count": 1,
|
"task_count": 1,
|
||||||
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/plaid_prod:1"
|
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/plaid_prod:1"
|
||||||
}
|
}
|
||||||
@@ -1832,7 +1832,7 @@
|
|||||||
],
|
],
|
||||||
"revision": 1,
|
"revision": 1,
|
||||||
"runtime_platform": [],
|
"runtime_platform": [],
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
"volume": []
|
"volume": []
|
||||||
@@ -1974,6 +1974,138 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"module": "module.square2_import_job",
|
||||||
|
"mode": "managed",
|
||||||
|
"type": "aws_cloudwatch_event_rule",
|
||||||
|
"name": "schedule",
|
||||||
|
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
|
||||||
|
"instances": [
|
||||||
|
{
|
||||||
|
"schema_version": 0,
|
||||||
|
"attributes": {
|
||||||
|
"arn": "arn:aws:events:us-east-1:679918342773:rule/square2-import-job-schedule",
|
||||||
|
"description": "",
|
||||||
|
"event_bus_name": "default",
|
||||||
|
"event_pattern": null,
|
||||||
|
"id": "square2-import-job-schedule",
|
||||||
|
"is_enabled": true,
|
||||||
|
"name": "square2-import-job-schedule",
|
||||||
|
"name_prefix": "",
|
||||||
|
"role_arn": "",
|
||||||
|
"schedule_expression": "rate(5 hours)",
|
||||||
|
"tags": null,
|
||||||
|
"tags_all": {}
|
||||||
|
},
|
||||||
|
"sensitive_attributes": [],
|
||||||
|
"private": "bnVsbA=="
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"module": "module.square2_import_job",
|
||||||
|
"mode": "managed",
|
||||||
|
"type": "aws_cloudwatch_event_target",
|
||||||
|
"name": "job_target",
|
||||||
|
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
|
||||||
|
"instances": [
|
||||||
|
{
|
||||||
|
"schema_version": 1,
|
||||||
|
"attributes": {
|
||||||
|
"arn": "arn:aws:ecs:us-east-1:679918342773:cluster/default",
|
||||||
|
"batch_target": [],
|
||||||
|
"dead_letter_config": [],
|
||||||
|
"ecs_target": [
|
||||||
|
{
|
||||||
|
"enable_ecs_managed_tags": false,
|
||||||
|
"enable_execute_command": false,
|
||||||
|
"group": "",
|
||||||
|
"launch_type": "",
|
||||||
|
"network_configuration": [
|
||||||
|
{
|
||||||
|
"assign_public_ip": true,
|
||||||
|
"security_groups": [
|
||||||
|
"sg-004e5855310c453a3",
|
||||||
|
"sg-02d167406b1082698"
|
||||||
|
],
|
||||||
|
"subnets": [
|
||||||
|
"subnet-5e675761",
|
||||||
|
"subnet-8519fde2",
|
||||||
|
"subnet-89bab8d4"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"placement_constraint": [],
|
||||||
|
"platform_version": "",
|
||||||
|
"propagate_tags": "TASK_DEFINITION",
|
||||||
|
"tags": null,
|
||||||
|
"task_count": 1,
|
||||||
|
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/square2_import_job_prod:1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"event_bus_name": "default",
|
||||||
|
"http_target": [],
|
||||||
|
"id": "square2-import-job-schedule-square2-import-job",
|
||||||
|
"input": "",
|
||||||
|
"input_path": "",
|
||||||
|
"input_transformer": [],
|
||||||
|
"kinesis_target": [],
|
||||||
|
"redshift_target": [],
|
||||||
|
"retry_policy": [],
|
||||||
|
"role_arn": "arn:aws:iam::679918342773:role/service-role/Amazon_EventBridge_Invoke_ECS_1758992733",
|
||||||
|
"rule": "square2-import-job-schedule",
|
||||||
|
"run_command_targets": [],
|
||||||
|
"sqs_target": [],
|
||||||
|
"target_id": "square2-import-job"
|
||||||
|
},
|
||||||
|
"sensitive_attributes": [],
|
||||||
|
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==",
|
||||||
|
"dependencies": [
|
||||||
|
"module.square2_import_job.aws_cloudwatch_event_rule.schedule",
|
||||||
|
"module.square2_import_job.aws_ecs_task_definition.background_taskdef"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"module": "module.square2_import_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/square2_import_job_prod:1",
|
||||||
|
"container_definitions": "[{\"cpu\":0,\"dockerLabels\":{\"com.datadoghq.tags.env\":\"prod\",\"com.datadoghq.tags.service\":\"square2-import-job\"},\"environment\":[{\"name\":\"DD_CONTAINER_ENV_AS_TAGS\",\"value\":\"{\\\"INTEGREAT_JOB\\\":\\\"background_job\\\"}\"},{\"name\":\"DD_ENV\",\"value\":\"prod\"},{\"name\":\"DD_SERVICE\",\"value\":\"square2-import-job\"},{\"name\":\"INTEGREAT_JOB\",\"value\":\"square2-import-job\"},{\"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": "1024",
|
||||||
|
"ephemeral_storage": [],
|
||||||
|
"execution_role_arn": "arn:aws:iam::679918342773:role/ecsTaskExecutionRole",
|
||||||
|
"family": "square2_import_job_prod",
|
||||||
|
"id": "square2_import_job_prod",
|
||||||
|
"inference_accelerator": [],
|
||||||
|
"ipc_mode": "",
|
||||||
|
"memory": "4096",
|
||||||
|
"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.square_import_job",
|
"module": "module.square_import_job",
|
||||||
"mode": "managed",
|
"mode": "managed",
|
||||||
@@ -2126,7 +2258,7 @@
|
|||||||
"name_prefix": "",
|
"name_prefix": "",
|
||||||
"role_arn": "",
|
"role_arn": "",
|
||||||
"schedule_expression": "rate(1 hour)",
|
"schedule_expression": "rate(1 hour)",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {}
|
"tags_all": {}
|
||||||
},
|
},
|
||||||
"sensitive_attributes": [],
|
"sensitive_attributes": [],
|
||||||
@@ -2170,7 +2302,7 @@
|
|||||||
"placement_constraint": [],
|
"placement_constraint": [],
|
||||||
"platform_version": "",
|
"platform_version": "",
|
||||||
"propagate_tags": "TASK_DEFINITION",
|
"propagate_tags": "TASK_DEFINITION",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"task_count": 1,
|
"task_count": 1,
|
||||||
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/sysco_prod:1"
|
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/sysco_prod:1"
|
||||||
}
|
}
|
||||||
@@ -2228,7 +2360,7 @@
|
|||||||
],
|
],
|
||||||
"revision": 1,
|
"revision": 1,
|
||||||
"runtime_platform": [],
|
"runtime_platform": [],
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
"volume": []
|
"volume": []
|
||||||
@@ -2248,13 +2380,13 @@
|
|||||||
{
|
{
|
||||||
"schema_version": 0,
|
"schema_version": 0,
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"arn": "arn:aws:events:us-east-1:679918342773:rule/plaid-schedule",
|
"arn": "arn:aws:events:us-east-1:679918342773:rule/vendor-usages-schedule",
|
||||||
"description": "",
|
"description": "",
|
||||||
"event_bus_name": "default",
|
"event_bus_name": "default",
|
||||||
"event_pattern": null,
|
"event_pattern": null,
|
||||||
"id": "plaid-schedule",
|
"id": "vendor-usages-schedule",
|
||||||
"is_enabled": true,
|
"is_enabled": true,
|
||||||
"name": "plaid-schedule",
|
"name": "vendor-usages-schedule",
|
||||||
"name_prefix": "",
|
"name_prefix": "",
|
||||||
"role_arn": "",
|
"role_arn": "",
|
||||||
"schedule_expression": "rate(4 hours)",
|
"schedule_expression": "rate(4 hours)",
|
||||||
@@ -2304,12 +2436,12 @@
|
|||||||
"propagate_tags": "TASK_DEFINITION",
|
"propagate_tags": "TASK_DEFINITION",
|
||||||
"tags": null,
|
"tags": null,
|
||||||
"task_count": 1,
|
"task_count": 1,
|
||||||
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/plaid_prod:1"
|
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/vendor_usages_prod:1"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"event_bus_name": "default",
|
"event_bus_name": "default",
|
||||||
"http_target": [],
|
"http_target": [],
|
||||||
"id": "plaid-schedule-plaid",
|
"id": "vendor-usages-schedule-vendor-usages",
|
||||||
"input": "",
|
"input": "",
|
||||||
"input_path": "",
|
"input_path": "",
|
||||||
"input_transformer": [],
|
"input_transformer": [],
|
||||||
@@ -2317,10 +2449,10 @@
|
|||||||
"redshift_target": [],
|
"redshift_target": [],
|
||||||
"retry_policy": [],
|
"retry_policy": [],
|
||||||
"role_arn": "arn:aws:iam::679918342773:role/service-role/Amazon_EventBridge_Invoke_ECS_1758992733",
|
"role_arn": "arn:aws:iam::679918342773:role/service-role/Amazon_EventBridge_Invoke_ECS_1758992733",
|
||||||
"rule": "plaid-schedule",
|
"rule": "vendor-usages-schedule",
|
||||||
"run_command_targets": [],
|
"run_command_targets": [],
|
||||||
"sqs_target": [],
|
"sqs_target": [],
|
||||||
"target_id": "plaid"
|
"target_id": "vendor-usages"
|
||||||
},
|
},
|
||||||
"sensitive_attributes": [],
|
"sensitive_attributes": [],
|
||||||
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==",
|
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==",
|
||||||
@@ -2341,13 +2473,13 @@
|
|||||||
{
|
{
|
||||||
"schema_version": 1,
|
"schema_version": 1,
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/plaid_prod:2",
|
"arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/vendor_usages_prod:1",
|
||||||
"container_definitions": "[{\"cpu\":0,\"dockerLabels\":{\"com.datadoghq.tags.env\":\"prod\",\"com.datadoghq.tags.service\":\"plaid\"},\"environment\":[{\"name\":\"DD_CONTAINER_ENV_AS_TAGS\",\"value\":\"{\\\"INTEGREAT_JOB\\\":\\\"background_job\\\"}\"},{\"name\":\"DD_ENV\",\"value\":\"prod\"},{\"name\":\"DD_SERVICE\",\"value\":\"plaid\"},{\"name\":\"INTEGREAT_JOB\",\"value\":\"plaid\"},{\"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\":[]}]",
|
"container_definitions": "[{\"cpu\":0,\"dockerLabels\":{\"com.datadoghq.tags.env\":\"prod\",\"com.datadoghq.tags.service\":\"vendor-usages\"},\"environment\":[{\"name\":\"DD_CONTAINER_ENV_AS_TAGS\",\"value\":\"{\\\"INTEGREAT_JOB\\\":\\\"background_job\\\"}\"},{\"name\":\"DD_ENV\",\"value\":\"prod\"},{\"name\":\"DD_SERVICE\",\"value\":\"vendor-usages\"},{\"name\":\"INTEGREAT_JOB\",\"value\":\"vendor-usages\"},{\"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": "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",
|
||||||
"family": "plaid_prod",
|
"family": "vendor_usages_prod",
|
||||||
"id": "plaid_prod",
|
"id": "vendor_usages_prod",
|
||||||
"inference_accelerator": [],
|
"inference_accelerator": [],
|
||||||
"ipc_mode": "",
|
"ipc_mode": "",
|
||||||
"memory": "2048",
|
"memory": "2048",
|
||||||
@@ -2358,7 +2490,7 @@
|
|||||||
"requires_compatibilities": [
|
"requires_compatibilities": [
|
||||||
"FARGATE"
|
"FARGATE"
|
||||||
],
|
],
|
||||||
"revision": 2,
|
"revision": 1,
|
||||||
"runtime_platform": [],
|
"runtime_platform": [],
|
||||||
"tags": null,
|
"tags": null,
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
@@ -2390,7 +2522,7 @@
|
|||||||
"name_prefix": "",
|
"name_prefix": "",
|
||||||
"role_arn": "",
|
"role_arn": "",
|
||||||
"schedule_expression": "rate(6 hours)",
|
"schedule_expression": "rate(6 hours)",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {}
|
"tags_all": {}
|
||||||
},
|
},
|
||||||
"sensitive_attributes": [],
|
"sensitive_attributes": [],
|
||||||
@@ -2434,7 +2566,7 @@
|
|||||||
"placement_constraint": [],
|
"placement_constraint": [],
|
||||||
"platform_version": "",
|
"platform_version": "",
|
||||||
"propagate_tags": "TASK_DEFINITION",
|
"propagate_tags": "TASK_DEFINITION",
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"task_count": 1,
|
"task_count": 1,
|
||||||
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/yodlee2_prod:1"
|
"task_definition_arn": "arn:aws:ecs:us-east-1:679918342773:task-definition/yodlee2_prod:1"
|
||||||
}
|
}
|
||||||
@@ -2492,7 +2624,7 @@
|
|||||||
],
|
],
|
||||||
"revision": 1,
|
"revision": 1,
|
||||||
"runtime_platform": [],
|
"runtime_platform": [],
|
||||||
"tags": null,
|
"tags": {},
|
||||||
"tags_all": {},
|
"tags_all": {},
|
||||||
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
"task_role_arn": "arn:aws:iam::679918342773:role/datomic-ddb",
|
||||||
"volume": []
|
"volume": []
|
||||||
|
|||||||
Reference in New Issue
Block a user