diff --git a/_variables.tf b/_variables.tf index 90155a2..a232945 100644 --- a/_variables.tf +++ b/_variables.tf @@ -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" +} \ No newline at end of file diff --git a/cloudwatch-logs-exporter.tf b/cloudwatch-logs-exporter.tf index a6c714c..516d1c2 100644 --- a/cloudwatch-logs-exporter.tf +++ b/cloudwatch-logs-exporter.tf @@ -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 = { diff --git a/versions.tf b/versions.tf index 4dc2caa..1e2be2d 100644 --- a/versions.tf +++ b/versions.tf @@ -3,7 +3,7 @@ terraform { required_providers { aws = { - version = "~> 4.61.0" + version = ">= 4.61.0" } random = { version = ">= 3.4.0"