Skip to content

Commit

Permalink
fix: use try on length(var.subnets) (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocode authored May 6, 2024
1 parent 62a6f87 commit 8b6600c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ locals {
computed_major_engine_version = var.engine == "postgres" ? join(".", slice(split(".", var.engine_version), 0, 1)) : join(".", slice(split(".", var.engine_version), 0, 2))
major_engine_version = var.major_engine_version == "" ? local.computed_major_engine_version : var.major_engine_version

subnet_ids_provided = var.subnet_ids != null && length(var.subnet_ids) > 0
subnet_ids_provided = var.subnet_ids != null && try(length(var.subnet_ids), 0) > 0
db_subnet_group_name_provided = var.db_subnet_group_name != null && var.db_subnet_group_name != ""
is_replica = try(length(var.replicate_source_db), 0) > 0

Expand Down

0 comments on commit 8b6600c

Please sign in to comment.