🔧 chore(terraform): update security group rules to allow ingress and egress traffic on port 8080

🔧 chore(terraform): modify user data script for manager instance to fetch instance metadata with token and start a netcat server on port 8080 to provide join token
🔧 chore(terraform): modify user data script for worker instance to fetch manager IP and join the swarm using the join token obtained from the manager on port 8080
This commit is contained in:
Matheus Jacques 2023-08-24 18:48:44 +02:00
commit d13771d8c9
2 changed files with 36 additions and 9 deletions

View file

@ -89,4 +89,18 @@ resource "aws_security_group" "swarm-sg" {
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 8080
to_port = 8080
protocol = "tcp"
cidr_blocks = [aws_subnet.swarm-public-subnet.cidr_block]
}
egress {
from_port = 8080
to_port = 8080
protocol = "tcp"
cidr_blocks = [aws_subnet.swarm-public-subnet.cidr_block]
}
}