File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ resource "aws_rds_cluster" "main" {
3434 preferred_maintenance_window = " ${ var . preferred_maintenance_window } "
3535 port = " ${ local . port } "
3636 db_subnet_group_name = " ${ aws_db_subnet_group . main . name } "
37- vpc_security_group_ids = [" ${ aws_security_group . main . id } " ]
37+ vpc_security_group_ids = [" ${ concat ( list ( aws_security_group. main . id ), var . extra_security_groups ) } " ]
3838 snapshot_identifier = " ${ var . snapshot_identifier } "
3939 storage_encrypted = " ${ var . storage_encrypted } "
4040 apply_immediately = " ${ var . apply_immediately } "
Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ variable "allowed_security_groups" {
3434 default = []
3535}
3636
37+ variable "extra_security_groups" {
38+ description = " A list of Security Group IDs to add to the cluster"
39+ default = []
40+ }
41+
3742variable "vpc_id" {
3843 description = " VPC ID"
3944 type = " string"
You can’t perform that action at this time.
0 commit comments