Skip to content

Commit

Permalink
feat(provisioned_concurrency_config): make qualifier configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
sleistner committed Dec 17, 2019
1 parent c6fb5d0 commit 2517e03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ resource "aws_lambda_function" "main" {
}

resource "aws_lambda_provisioned_concurrency_config" "main" {
count = var.provisioned_concurrent_executions != null && var.publish ? 1 : 0
count = var.provisioned_concurrency_config != null && var.publish ? 1 : 0

function_name = aws_lambda_function.main.function_name
qualifier = aws_lambda_function.main.version
provisioned_concurrent_executions = var.provisioned_concurrent_executions
qualifier = var.provisioned_concurrency_config.qualifier
provisioned_concurrent_executions = var.provisioned_concurrency_config.provisioned_concurrent_executions
}
10 changes: 7 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ variable "function_name" {
description = "(Required) A unique name for the Lambda function."
}

variable "provisioned_concurrent_executions" {
type = number
description = "(Optional) Amount of capacity to allocate. Must be greater than or equal to 1."
variable "provisioned_concurrency_config" {
type = object({
provisioned_concurrent_executions = number
qualifier = string
})

description = "(Optional) Lambda Provisioned Concurrency Configuration."
default = null
}

Expand Down

0 comments on commit 2517e03

Please sign in to comment.