Skip to content

Commit ee3a345

Browse files
fix: lambda email fix (#5)
Co-authored-by: Lukasz <lukasz.rohde@gmail.com>
1 parent e8f62be commit ee3a345

File tree

1 file changed

+16
-32
lines changed

1 file changed

+16
-32
lines changed

aws-cognito-user-pool/main.tf

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -124,41 +124,25 @@ resource "aws_cognito_user_pool" "user_pool" {
124124
}
125125
}
126126

127-
dynamic "lambda_config" {
128-
for_each = try(coalesce(
129-
var.lambda_create_auth_challenge,
130-
var.lambda_custom_message,
131-
var.lambda_define_auth_challenge,
132-
var.lambda_post_authentication,
133-
var.lambda_post_confirmation,
134-
var.lambda_pre_authentication,
135-
var.lambda_pre_sign_up,
136-
var.lambda_pre_token_generation,
137-
var.lambda_user_migration,
138-
var.lambda_verify_auth_challenge_response,
139-
var.lambda_custom_email_sender,
140-
var.lambda_kms_key_arn
141-
), null) == null ? [] : [true]
142-
143-
content {
144-
create_auth_challenge = var.lambda_create_auth_challenge
145-
custom_message = var.lambda_custom_message
146-
define_auth_challenge = var.lambda_define_auth_challenge
147-
post_authentication = var.lambda_post_authentication
148-
post_confirmation = var.lambda_post_confirmation
149-
pre_authentication = var.lambda_pre_authentication
150-
pre_sign_up = var.lambda_pre_sign_up
151-
pre_token_generation = var.lambda_pre_token_generation
152-
user_migration = var.lambda_user_migration
153-
verify_auth_challenge_response = var.lambda_verify_auth_challenge_response
154-
kms_key_id = var.lambda_kms_key_arn
155-
custom_email_sender {
156-
lambda_arn = var.lambda_custom_email_sender.lambda_arn
157-
lambda_version = var.lambda_custom_email_sender.lambda_version
158-
}
127+
lambda_config {
128+
create_auth_challenge = var.lambda_create_auth_challenge
129+
custom_message = var.lambda_custom_message
130+
define_auth_challenge = var.lambda_define_auth_challenge
131+
post_authentication = var.lambda_post_authentication
132+
post_confirmation = var.lambda_post_confirmation
133+
pre_authentication = var.lambda_pre_authentication
134+
pre_sign_up = var.lambda_pre_sign_up
135+
pre_token_generation = var.lambda_pre_token_generation
136+
user_migration = var.lambda_user_migration
137+
verify_auth_challenge_response = var.lambda_verify_auth_challenge_response
138+
kms_key_id = var.lambda_kms_key_arn
139+
custom_email_sender {
140+
lambda_arn = var.lambda_custom_email_sender.lambda_arn
141+
lambda_version = var.lambda_custom_email_sender.lambda_version
159142
}
160143
}
161144

145+
162146
# Configuration block for Short Message Service (SMS) settings.
163147
# These settings apply to SMS user verification and SMS Multi-Factor Authentication (MFA).
164148
# Due to Cognito API restrictions, the SMS configuration cannot be removed without recreating the Cognito User Pool.

0 commit comments

Comments
 (0)