diff --git a/rds.tf b/rds.tf index d96c8a0..4cec5b9 100644 --- a/rds.tf +++ b/rds.tf @@ -23,7 +23,7 @@ resource "aws_security_group" "rds" { to_port = local.truefoundry_db_port protocol = "tcp" security_groups = var.truefoundry_db_ingress_security_group != "" ? [var.truefoundry_db_ingress_security_group] : [] - cidr_blocks = var.truefoundry_db_ingress_cidr_block != "" ? [var.truefoundry_db_ingress_cidr_block] : [] + cidr_blocks = length(var.truefoundry_db_ingress_cidr_blocks) > 0 ? var.truefoundry_db_ingress_cidr_blocks : [] } egress { diff --git a/variables.tf b/variables.tf index 79dd14f..27a6316 100644 --- a/variables.tf +++ b/variables.tf @@ -56,9 +56,9 @@ variable "truefoundry_db_ingress_security_group" { description = "SG allowed to connect to the database" } -variable "truefoundry_db_ingress_cidr_block" { - type = string - description = "CIDR block allowed to connect to the database" +variable "truefoundry_db_ingress_cidr_blocks" { + type = list(string) + description = "CIDR blocks allowed to connect to the database" } variable "truefoundry_db_subnet_ids" {