Skip to content

Commit 6d04c87

Browse files
committed
port open all
1 parent 8db3620 commit 6d04c87

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

terraform/modules/k8s-cluster/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ resource "aws_instance" "bastion" {
2424
depends_on = [tls_private_key.node-key]
2525
}
2626

27-
resource "null_resource" "copy-pem" {
27+
resource "null_resource" "create-pem" {
2828
provisioner "local-exec" {
2929
command = <<EOT
3030
echo '${tls_private_key.node-key.private_key_openssh}' > ./node-key.pem
3131
chmod 600 ./node-key.pem
3232
EOT
3333
}
34+
}
3435

36+
resource "null_resource" "copy-pem" {
3537
# Now use the file provisioner to upload the private key to the bastion host
3638
provisioner "file" {
3739
source = "./node-key.pem" # Use the local file created by local-exec
@@ -57,7 +59,7 @@ resource "null_resource" "copy-pem" {
5759
]
5860
}
5961

60-
depends_on = [aws_instance.bastion]
62+
depends_on = [null_resource.create-pem]
6163
}
6264

6365
resource "aws_instance" "master" {

terraform/modules/security-groups/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,39 +37,39 @@ resource "aws_security_group" "master_sg" {
3737
from_port = 6443
3838
to_port = 6443
3939
protocol = "tcp"
40-
cidr_blocks = [var.private_subnet_cidr]
40+
cidr_blocks = ["0.0.0.0/0"]
4141
}
4242

4343
ingress {
4444
description = "ETCD"
4545
from_port = 2379
4646
to_port = 2380
4747
protocol = "tcp"
48-
cidr_blocks = [var.private_subnet_cidr]
48+
cidr_blocks = ["0.0.0.0/0"]
4949
}
5050

5151
ingress {
5252
description = "Weavenet TCP"
5353
from_port = 6783
5454
to_port = 6783
5555
protocol = "tcp"
56-
cidr_blocks = [var.private_subnet_cidr]
56+
cidr_blocks = ["0.0.0.0/0"]
5757
}
5858

5959
ingress {
6060
description = "Weavenet TCP"
6161
from_port = 6784
6262
to_port = 6784
6363
protocol = "udp"
64-
cidr_blocks = [var.private_subnet_cidr]
64+
cidr_blocks = ["0.0.0.0/0"]
6565
}
6666

6767
ingress {
6868
description = "Kubelet API"
6969
from_port = 10248
7070
to_port = 10260
7171
protocol = "tcp"
72-
cidr_blocks = [var.private_subnet_cidr]
72+
cidr_blocks = ["0.0.0.0/0"]
7373
}
7474

7575
egress {

0 commit comments

Comments
 (0)