Skip to content

Commit aee9743

Browse files
committed
New feature: Build Lambda in Docker for support MacOS
1 parent ab0dd50 commit aee9743

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Simple SSL check and expiring certificates reminder with additional DNS check an
77
```hcl
88
module "ssl_checker" {
99
source = "fivexl/ssl-checker/aws"
10-
version = "1.0.1"
10+
version = "1.0.2"
1111
hostnames = ["fivexl.io", "google.com"]
1212
slack_hook_url = "https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXXXX"
1313
}
@@ -22,12 +22,14 @@ module "ssl_checker" {
2222
| python | >= 3.8 |
2323
| pip | |
2424

25-
*Works on Linux / MacOS / Windows
25+
## For Mac OS
26+
Please use `build_in_docker = true` and build inside docker for avoid nassl problem
2627

2728
## Inputs
2829

2930
| Name | Description | Type | Default | Required |
3031
|------|-------------|------|---------|:--------:|
32+
| build_in_docker | Build in docker for avoid problems with local environment | `bool` | `false` | no |
3133
| certificate_expiration_notice_days | Days prior to the notification of the expired certificate. | `string` | `"7"` | no |
3234
| cloudwatch_logs_retention_in_days | Specifies the number of days you want to retain log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. | `number` | `14` | no |
3335
| function_name | Lambda function name. | `string` | `"ssl-checker"` | no |

main.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ resource "aws_cloudwatch_event_rule" "rule" {
66
}
77

88
module "lambda" {
9-
source = "terraform-aws-modules/lambda/aws"
10-
version = "1.39.0"
11-
function_name = var.function_name
12-
description = "Lambda to monitor app https endpoint availability and SSL certificate validity."
13-
handler = "ssl-check-to-slack.main"
9+
source = "terraform-aws-modules/lambda/aws"
10+
version = "1.39.0"
11+
function_name = var.function_name
12+
description = "Lambda to monitor app https endpoint availability and SSL certificate validity."
13+
handler = "ssl-check-to-slack.main"
14+
build_in_docker = var.build_in_docker
1415
source_path = [
1516
{
1617
path = "${path.module}/ssl-check-to-slack.py",

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
variable "build_in_docker" {
2+
description = "Build in docker for avoid problems with local environment"
3+
type = bool
4+
default = false
5+
}
6+
17
variable "certificate_expiration_notice_days" {
28
description = "Days prior to the notification of the expired certificate"
39
type = string

0 commit comments

Comments
 (0)