diff --git a/functions.tf b/functions.tf index 297b7136d8456e5b618cccd59b9b16f4bf1cb243..d6cfc4a01bfbaf67fcca686132e0dc1d8c24e7d0 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 0000000000000000000000000000000000000000..88427be7e4d77ae933dd73406f1a87541f9fa589 --- /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")