Skip to content

Commit

Permalink
Merge pull request #142 from lgallard/fix/pre_token_generation_config-2
Browse files Browse the repository at this point in the history
Fix case when no `pre_token_generation_config` is present
  • Loading branch information
lgallard authored Apr 22, 2024
2 parents b0912d9 + c6f7adf commit c848ab4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.27.2 (April 22, 2024)

FIXES:

* Fix case when no `pre_token_generation_config` is present

## 0.27.1 (April 22, 2024)

FIXES:
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ resource "aws_cognito_user_pool" "pool" {
pre_sign_up = lookup(var.lambda_config, "pre_sign_up", var.lambda_config_pre_sign_up)
pre_token_generation = lookup(var.lambda_config, "pre_token_generation", var.lambda_config_pre_token_generation)
dynamic "pre_token_generation_config" {
for_each = length(var.lambda_config["pre_token_generation_config"]) > 0 ? [var.lambda_config["pre_token_generation_config"]] : []
for_each = lookup(var.lambda_config, "pre_token_generation_config", null) != null ? [lookup(var.lambda_config, "pre_token_generation_config", {})] : []
content {
lambda_arn = lookup(for_each.value, "lambda_arn", null)
lambda_version = lookup(for_each.value, "lambda_version", null)
Expand Down

0 comments on commit c848ab4

Please sign in to comment.