Skip to content

Commit 9c7f6b6

Browse files
committed
wip
1 parent 480b6b3 commit 9c7f6b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ variable "email_sender_providers" {
6262
}
6363

6464
validation {
65-
condition = !contains(var.email_sender_providers, "sendgrid") || (contains(var.email_sender_providers, "sendgrid") && length(var.sendgrid_email_send_api_key) > 0)
65+
condition = !contains(var.email_sender_providers, "sendgrid") || (contains(var.email_sender_providers, "sendgrid") && try(length(var.sendgrid_email_send_api_key) > 0, false))
6666
error_message = "SendGrid is set as email provider but its API is not set."
6767
}
6868
}
@@ -85,7 +85,7 @@ variable "sendgrid_email_verification_api_key" {
8585
default = ""
8686

8787
validation {
88-
condition = !var.sendgrid_email_verification_enabled || (var.sendgrid_email_verification_enabled && length("${var.sendgrid_email_verification_api_key}${var.sendgrid_api_key}") > 0)
88+
condition = !var.sendgrid_email_verification_enabled || (var.sendgrid_email_verification_enabled && try(length("${var.sendgrid_email_verification_api_key}${var.sendgrid_api_key}") > 0, false))
8989
error_message = "SendGrid Email Verification is enabled but API Key is not set."
9090
}
9191
}

0 commit comments

Comments
 (0)