Hi,
I created a Terraform module for AuororaDB that is working as expected but I have one "little problem" and I can't find a proper solution to this.
Is it possible to add new parameters to an existing aws_db_parameter_group by using the attributes exported by the resource(arn/id) ?
I am using this code to create the resource, which is working fine and it modifies one parameter but I'm not sure how to do in case of multiple parameters (since it's running as a module i can't say how many parameters to be used because on some env i need 3, on others only one, etc)
# Aurora DB Parameter Group
resource "aws_db_parameter_group" "rds_db_param" {
count = "${var.is_enabled_db_group_param}"
description = "auroradb parameter group"
name = "${var.db_param_group_name}"
family = "${var.db_param_group_family}"
parameter {
name = "${var.db_param_name}"
value = "${var.db_param_value}"
}
}
But if later I will need to change a new DB parameter, this can't be done without modifying the entire RDS module and add a new parameter which will mess my other evn where I need only one parameter to be changed.
Is there a similar way of appending parameters as is the case of security groups? (where i can use a resource like aws_security_group_rule to add a new rule and append it to the existing security group)
Thanks,
Ionut