diff --git a/terraform/ec2.tf b/terraform/ec2.tf index a5af368..8da8128 100755 --- a/terraform/ec2.tf +++ b/terraform/ec2.tf @@ -18,13 +18,13 @@ resource "aws_security_group" "netlab_sg" { from_port = 22 to_port = 22 protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] + cidr_blocks = [var.AWS_LOCAL_IP] } ingress { from_port = 50080 to_port = 50080 protocol = "tcp" - cidr_blocks = ["0.0.0.0/0"] + cidr_blocks = [var.AWS_LOCAL_IP] } } diff --git a/terraform/variables.tf b/terraform/variables.tf index 865b22f..a13af31 100755 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -8,6 +8,11 @@ variable "AWS_R53_ENABLED" { default = false } +variable "AWS_LOCAL_IP" { + type = string + default = "0.0.0.0/0" +} + variable "GITHUB_REPO_URL" { type = string default = ""