From d1d45a30249c41890230657e5ac3a1e75248a4a5 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Fri, 30 Apr 2021 21:32:58 +0300
Subject: [PATCH] Add checks for vouch.shore.co.il.

---
 functions.tf |  1 +
 src/vouch.py | 14 ++++++++++++++
 2 files changed, 15 insertions(+)
 create mode 100644 src/vouch.py

diff --git a/functions.tf b/functions.tf
index cf3bbdb..9a2613d 100644
--- a/functions.tf
+++ b/functions.tf
@@ -12,6 +12,7 @@ locals {
     "myip",
     "kodi",
     "transmission",
+    "vouch",
   ]
   function_names = [for name in local.functions : "${local.function_name_prefix}-${replace(name, "_", "")}"]
 }
diff --git a/src/vouch.py b/src/vouch.py
new file mode 100644
index 0000000..3a82a4f
--- /dev/null
+++ b/src/vouch.py
@@ -0,0 +1,14 @@
+from utils import check_urls
+
+
+def handler(event, context):  # pylint: disable=unused-argument
+    """Lambda event handler."""
+    checks = [
+        {"url": "http://vouch.shore.co.il/", "codes": [301, 302]},
+        {"url": "https://vouch.shore.co.il/validate", "codes": [401]},
+    ]
+    check_urls(checks)
+
+
+if __name__ == "__main__":
+    handler("event", "context")
-- 
GitLab