diff --git a/main.tf b/main.tf index 4afc322..2f40918 100644 --- a/main.tf +++ b/main.tf @@ -210,7 +210,6 @@ resource "aws_db_instance" "rds" { lifecycle { precondition { condition = var.storage_type != "io2" || (var.db_iops != null ? var.db_iops >= 1000 : false) - # condition = var.storage_type != "io2" || (var.db_iops != null && var.db_iops >= 1000) error_message = "When 'storage_type' is 'io2', 'db_iops' must be specified and at least 1000." } @@ -223,10 +222,10 @@ resource "aws_db_instance" "rds" { # error_message = "When 'storage_type' is 'io2', 'db_allocated_storage' must be at least 100 GiB unless using SQL which must be at least 20 GiB." # } - # precondition { - # condition = var.storage_type != "gp3" || var.db_allocated_storage >= 20 - # error_message = "When 'storage_type' is 'gp3', 'db_allocated_storage' must be at least 20 GiB." - # } + precondition { + condition = var.storage_type != "gp3" || var.db_allocated_storage >= 20 + error_message = "When 'storage_type' is 'gp3', 'db_allocated_storage' must be at least 20 GiB." + } # precondition { # condition = var.storage_type != "gp3" || contains(["sqlserver-ee", "sqlserver-se", "sqlserver-ex", "sqlserver-web"], var.db_engine) || (