Skip to content

Commit 912e11d

Browse files
authored
feat: add support for recreating package locally if not missing/not present (#158)
1 parent 1566f91 commit 912e11d

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.60.0
3+
rev: v1.61.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ See the [functions](https://github.com/terraform-aws-modules/terraform-aws-notif
114114
| <a name="input_lambda_function_vpc_subnet_ids"></a> [lambda\_function\_vpc\_subnet\_ids](#input\_lambda\_function\_vpc\_subnet\_ids) | List of subnet ids when Lambda Function should run in the VPC. Usually private or intra subnets. | `list(string)` | `null` | no |
115115
| <a name="input_lambda_role"></a> [lambda\_role](#input\_lambda\_role) | IAM role attached to the Lambda Function. If this is set then a role will not be created for you. | `string` | `""` | no |
116116
| <a name="input_log_events"></a> [log\_events](#input\_log\_events) | Boolean flag to enabled/disable logging of incoming events | `bool` | `false` | no |
117+
| <a name="input_recreate_missing_package"></a> [recreate\_missing\_package](#input\_recreate\_missing\_package) | Whether to recreate missing Lambda package if it is missing locally or not | `bool` | `true` | no |
117118
| <a name="input_reserved_concurrent_executions"></a> [reserved\_concurrent\_executions](#input\_reserved\_concurrent\_executions) | The amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations | `number` | `-1` | no |
118119
| <a name="input_slack_channel"></a> [slack\_channel](#input\_slack\_channel) | The name of the channel in Slack for notifications | `string` | n/a | yes |
119120
| <a name="input_slack_emoji"></a> [slack\_emoji](#input\_slack\_emoji) | A custom emoji that will appear on Slack messages | `string` | `":aws:"` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ module "lambda" {
7979

8080
handler = "notify_slack.lambda_handler"
8181
source_path = "${path.module}/functions/notify_slack.py"
82+
recreate_missing_package = var.recreate_missing_package
8283
runtime = "python3.8"
8384
timeout = 30
8485
kms_key_arn = var.kms_key_arn

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ variable "kms_key_arn" {
6666
default = ""
6767
}
6868

69+
variable "recreate_missing_package" {
70+
description = "Whether to recreate missing Lambda package if it is missing locally or not"
71+
type = bool
72+
default = true
73+
}
74+
6975
variable "log_events" {
7076
description = "Boolean flag to enabled/disable logging of incoming events"
7177
type = bool

0 commit comments

Comments
 (0)