Skip to content

Commit 13b42e7

Browse files
committed
aws: Permit inter-node network traffic
Permit target nodes to mount the kdevops NFS server by adding a security group that allows traffic between test nodes. Tested-by: Luis Chamberlain <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 519e532 commit 13b42e7

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

terraform/aws/main.tf

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ resource "aws_security_group" "kdevops_sec_group" {
5151
}
5252
}
5353

54+
resource "aws_security_group" "kdevops_internal_group" {
55+
name = "kdevops_isg"
56+
vpc_id = aws_vpc.kdevops_vpc.id
57+
58+
# Allow all traffic between hosts in the security group
59+
ingress {
60+
cidr_blocks = [
61+
"10.0.0.0/16",
62+
]
63+
from_port = 0
64+
to_port = 0
65+
protocol = "-1"
66+
}
67+
}
68+
69+
5470
resource "aws_key_pair" "kdevops_keypair" {
5571
key_name = var.ssh_keyname
5672
public_key = var.ssh_pubkey_data != "" ? var.ssh_pubkey_data : var.ssh_config_pubkey_file != "" ? file(var.ssh_config_pubkey_file) : ""
@@ -110,7 +126,10 @@ resource "aws_instance" "kdevops_instance" {
110126
count = local.kdevops_num_boxes
111127
ami = data.aws_ami.distro.id
112128
instance_type = var.aws_instance_type
113-
security_groups = [aws_security_group.kdevops_sec_group.id]
129+
security_groups = [
130+
aws_security_group.kdevops_sec_group.id,
131+
aws_security_group.kdevops_internal_group.id
132+
]
114133
key_name = var.ssh_keyname
115134
subnet_id = aws_subnet.kdevops_subnet.id
116135
user_data_base64 = element(

0 commit comments

Comments
 (0)