ec2.tf : use variable for ingress rules

This commit is contained in:
Damien A
2024-02-05 17:25:18 +01:00
parent 4695111d25
commit a4170247b3
2 changed files with 7 additions and 2 deletions

View File

@@ -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]
}
}

View File

@@ -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 = ""