Skip to content

Commit

Permalink
Add var to add more ingress SGs to hasura_rds SG
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahwh authored and Rayraegah committed Sep 30, 2019
1 parent 3eced34 commit 0a43308
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 @@ -155,7 +155,7 @@ resource "aws_security_group" "hasura_rds" {
protocol = "tcp"
from_port = "5432"
to_port = "5432"
security_groups = [aws_security_group.hasura_ecs.id]
security_groups = concat([aws_security_group.hasura_ecs.id], var.additional_db_security_groups)
}

egress {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,8 @@ variable "environment" {
description = "Environment variables for ECS task: [ { name = \"foo\", value = \"bar\" }, ..]"
default = []
}

variable "additional_db_security_groups" {
description = "List of Security Group IDs to have access to the RDS instance"
default = []
}

0 comments on commit 0a43308

Please sign in to comment.