From f740c56588ac119195242c8bae3cf8233f50e62f Mon Sep 17 00:00:00 2001 From: Piotr Sierkin Date: Thu, 28 Mar 2024 16:51:03 +0100 Subject: [PATCH] chore: remove additional code --- variables.tf | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/variables.tf b/variables.tf index d0f78ac..181c5d3 100644 --- a/variables.tf +++ b/variables.tf @@ -59,20 +59,13 @@ variable "schema_grants" { error_message = "Variable `schema_grants` fails validation - only one of `privileges` or `all_privileges` can be set." } validation { - condition = alltrue([for grant in var.schema_grants : + condition = alltrue([for grant in var.schema_grants : sum([ grant.all_schemas_in_database != null ? 1 : 0, grant.future_schemas_in_database != null ? 1 : 0, grant.schema_name != null ? 1 : 0 ]) == 1 ]) - sum( - [ - grant.all_schemas_in_database != null ? 1 : 0, - grant.future_schemas_in_database != null ? 1 : 0, - grant.schema_name != null ? 1 : 0]) == 1 - ] - ) error_message = "Variable `schema_grants` fails validation - only one of `all_schemas_in_database`, `future_schemas_in_database`, or `schema_name` can be set." } }