File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -26,3 +26,13 @@ resource "aws_security_group_rule" "redis_networks_ingress" {
2626 cidr_blocks = var. allowed_cidr
2727 security_group_id = aws_security_group. redis_security_group . id
2828}
29+
30+ resource "aws_security_group_rule" "redis_replication_egress" {
31+ count = var. is_migration_cluster ? 1 : 0
32+ type = " egress"
33+ from_port = 0
34+ to_port = 0
35+ protocol = " -1"
36+ cidr_blocks = [" 0.0.0.0/0" ]
37+ security_group_id = aws_security_group. redis_security_group . id
38+ }
Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ variable "redis_failover" {
5959 default = false
6060}
6161
62+ variable "is_migration_cluster" {
63+ description = " Specifies whether this is a cluster for replicating other EC2 redis. Useful for migrations."
64+ type = bool
65+ default = false
66+ }
67+
6268variable "redis_node_type" {
6369 description = " Instance type to use for creating the Redis cache clusters"
6470 type = string
You can’t perform that action at this time.
0 commit comments