Skip to content

Commit

Permalink
Make runtime version of lambda variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmacedot authored Jun 19, 2024
1 parent 53dd60b commit 2008e7e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ variable "cloudwatch_logs_export_bucket" {
default = ""
description = "Bucket to export logs"
}

variable "runtime" {
type = string
default = "python3.10"
description = "Runtime version of the lambda function"
}
2 changes: 1 addition & 1 deletion cloudwatch-logs-exporter.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ resource "aws_lambda_function" "log_exporter" {
source_code_hash = data.archive_file.log_exporter.output_base64sha256
timeout = 300

runtime = "python3.10"
runtime = var.runtime

environment {
variables = {
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {

required_providers {
aws = {
version = "~> 4.61.0"
version = ">= 4.61.0"
}
random = {
version = ">= 3.4.0"
Expand Down

0 comments on commit 2008e7e

Please sign in to comment.