Skip to content

Commit

Permalink
Merge pull request #104 from mvasilenko/add-mongodb-cluster-rules
Browse files Browse the repository at this point in the history
add rules for MongoDB cluster ports
  • Loading branch information
antonbabenko committed Feb 17, 2019
2 parents 02db299 + 8f9df08 commit 62cd2fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/mongodb/auto_values.tf
Expand Up @@ -6,7 +6,7 @@
variable "auto_ingress_rules" {
description = "List of ingress rules to add automatically"
type = "list"
default = ["mongodb-tcp"]
default = ["mongodb-27017-tcp", "mongodb-27018-tcp", "mongodb-27019-tcp"]
}

variable "auto_ingress_with_self" {
Expand Down
6 changes: 4 additions & 2 deletions rules.tf
Expand Up @@ -68,7 +68,9 @@ variable "rules" {
memcached-tcp = [11211, 11211, "tcp", "Memcached"]

# MongoDB
mongodb-tcp = [27017, 27017, "tcp", "MongoDB"]
mongodb-27017-tcp = [27017, 27017, "tcp", "MongoDB"]
mongodb-27018-tcp = [27018, 27018, "tcp", "MongoDB shard"]
mongodb-27019-tcp = [27019, 27019, "tcp", "MongoDB config server"]

# MySQL
mysql-tcp = [3306, 3306, "tcp", "MySQL/Aurora"]
Expand Down Expand Up @@ -258,7 +260,7 @@ variable "auto_groups" {
}

mongodb = {
ingress_rules = ["mongodb-tcp"]
ingress_rules = ["mongodb-27017-tcp", "mongodb-27018-tcp", "mongodb-27019-tcp"]
ingress_with_self = ["all-all"]
egress_rules = ["all-all"]
}
Expand Down

0 comments on commit 62cd2fe

Please sign in to comment.