Skip to content

Commit

Permalink
add truefoundry db ongress cidr block option
Browse files Browse the repository at this point in the history
  • Loading branch information
DeeAjayi committed Aug 27, 2024
1 parent 42e42fc commit 88b7ec4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ resource "aws_security_group" "rds" {
from_port = local.truefoundry_db_port
to_port = local.truefoundry_db_port
protocol = "tcp"
security_groups = [var.truefoundry_db_ingress_security_group]
security_groups = var.truefoundry_db_ingress_security_group != "" ? [var.truefoundry_db_ingress_security_group] : []
cidr_blocks = var.truefoundry_db_ingress_cidr_block != "" ? [var.truefoundry_db_ingress_cidr_block] : []
}

egress {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ variable "truefoundry_db_ingress_security_group" {
description = "SG allowed to connect to the database"
}

variable "truefoundry_db_ingress_cidr_block" {
type = string
description = "CIDR block allowed to connect to the database"
}

variable "truefoundry_db_subnet_ids" {
type = list(string)
description = "List of subnets where the RDS database will be deployed"
Expand Down

0 comments on commit 88b7ec4

Please sign in to comment.