From 91d7697f8d92397a4e52c7df00f1af0d5099d86d Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Fri, 30 Apr 2021 21:25:25 +0300 Subject: [PATCH] Add checks for myip.shore.co.il. --- functions.tf | 1 + src/myip.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 src/myip.py diff --git a/functions.tf b/functions.tf index 297b713..d6cfc4a 100644 --- a/functions.tf +++ b/functions.tf @@ -9,6 +9,7 @@ locals { "autoconfig", "mta-sta", "www", + "myip", ] function_names = [for name in local.functions : "${local.function_name_prefix}-${replace(name, "_", "")}"] } diff --git a/src/myip.py b/src/myip.py new file mode 100644 index 0000000..88427be --- /dev/null +++ b/src/myip.py @@ -0,0 +1,14 @@ +from utils import check_urls + + +def handler(event, context): # pylint: disable=unused-argument + """Lambda event handler.""" + checks = [ + {"url": "http://myip.shore.co.il/"}, + {"url": "https://myip.shore.co.il/"}, + ] + check_urls(checks) + + +if __name__ == "__main__": + handler("event", "context") -- GitLab