Skip to content

Commit

Permalink
feat: Enable db_parameter_group_name per instance (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
galbirk authored Oct 9, 2023
1 parent 59dbe7f commit d34e83c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions examples/postgresql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ module "aurora" {
storage_type = "aurora-iopt1"
instances = {
1 = {
instance_class = "db.r5.2xlarge"
publicly_accessible = true
instance_class = "db.r5.2xlarge"
publicly_accessible = true
db_parameter_group_name = "default.aurora-postgresql14"
}
2 = {
identifier = "static-member-1"
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ resource "aws_rds_cluster_instance" "this" {
ca_cert_identifier = var.ca_cert_identifier
cluster_identifier = aws_rds_cluster.this[0].id
copy_tags_to_snapshot = try(each.value.copy_tags_to_snapshot, var.copy_tags_to_snapshot)
db_parameter_group_name = var.create_db_parameter_group ? aws_db_parameter_group.this[0].id : var.db_parameter_group_name
db_parameter_group_name = var.create_db_parameter_group ? aws_db_parameter_group.this[0].id : try(each.value.db_parameter_group_name, var.db_parameter_group_name)
db_subnet_group_name = local.db_subnet_group_name
engine = var.engine
engine_version = var.engine_version
Expand Down

0 comments on commit d34e83c

Please sign in to comment.