Change in how security_groups is provided [rds module]
To avoid issues with Terraform not being able to compute the value of count
(e.g. * module.rds_database.aws_security_group_rule.rds_sg_in: aws_security_group_rule.rds_sg_in: value of 'count' cannot be computed
), you now have to provide the number of security groups provided in the security_groups
variable, via the security_groups_count
variable.
If the security groups you're providing to the rds
module are already created, and you're fetching them from a data source or have them hard-coded, you could still use the length
function to compute the value of security_groups_count
, like:
variable "security_groups" {
default = ["sg-12345676", "sg-9876543"]
}
module "rds" {
source = "..."
...
security_groups = "${var.security_groups}"
security_groups_count = "${length(var.security_groups)}"
}