Skip to content

Commit

Permalink
Allowing adding extra SGs for the cluster (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-rocket-internet authored Jul 12, 2019
1 parent 17b8b9f commit 873348b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource "aws_rds_cluster" "main" {
preferred_maintenance_window = "${var.preferred_maintenance_window}"
port = "${local.port}"
db_subnet_group_name = "${aws_db_subnet_group.main.name}"
vpc_security_group_ids = ["${aws_security_group.main.id}"]
vpc_security_group_ids = ["${concat(list(aws_security_group.main.id), var.extra_security_groups)}"]
snapshot_identifier = "${var.snapshot_identifier}"
storage_encrypted = "${var.storage_encrypted}"
apply_immediately = "${var.apply_immediately}"
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ variable "allowed_security_groups" {
default = []
}

variable "extra_security_groups" {
description = "A list of Security Group IDs to add to the cluster"
default = []
}

variable "vpc_id" {
description = "VPC ID"
type = "string"
Expand Down

0 comments on commit 873348b

Please sign in to comment.