Skip to content

Commit

Permalink
Allow specification of lambda runtime (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-niland authored May 1, 2024
1 parent af66051 commit 0a37bbb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module "codepipeline_notifications" {
| <a name="input_label_key_case"></a> [label\_key\_case](#input\_label\_key\_case) | The letter case of label keys (`tag` names) (i.e. `name`, `namespace`, `environment`, `stage`, `attributes`) to use in `tags`.<br>Possible values: `lower`, `title`, `upper`.<br>Default value: `title`. | `string` | `null` | no |
| <a name="input_label_order"></a> [label\_order](#input\_label\_order) | The naming order of the id output and Name tag.<br>Defaults to ["namespace", "environment", "stage", "name", "attributes"].<br>You can omit any of the 5 elements, but at least one must be present. | `list(string)` | `null` | no |
| <a name="input_label_value_case"></a> [label\_value\_case](#input\_label\_value\_case) | The letter case of output label values (also used in `tags` and `id`).<br>Possible values: `lower`, `title`, `upper` and `none` (no transformation).<br>Default value: `lower`. | `string` | `null` | no |
| <a name="input_lambda_runtime"></a> [lambda\_runtime](#input\_lambda\_runtime) | The runtime to use for the lambda function | `string` | `"python3.8"` | no |
| <a name="input_name"></a> [name](#input\_name) | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no |
| <a name="input_pipeline_event_type_ids"></a> [pipeline\_event\_type\_ids](#input\_pipeline\_event\_type\_ids) | The list of pipeline events to trigger a notification on | `list(string)` | <pre>[<br> "started",<br> "failed",<br> "canceled",<br> "resumed",<br> "succeeded",<br> "superseded"<br>]</pre> | no |
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ resource "aws_lambda_function" "pipeline_notification" {
filename = data.archive_file.notifier_package.output_path
function_name = module.this.id
role = aws_iam_role.pipeline_notification.arn
runtime = "python3.8"
runtime = var.lambda_runtime
source_code_hash = data.archive_file.notifier_package.output_base64sha256
handler = "notifier.handler"
timeout = 10
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,9 @@ variable "approval_event_type_ids" {
EOF
}
}

variable "lambda_runtime" {
type = string
description = "The runtime to use for the lambda function"
default = "python3.8"
}

0 comments on commit 0a37bbb

Please sign in to comment.