ec2.tf : use variable for ingress rules
This commit is contained in:
@@ -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]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 = ""
|
||||
|
||||
Reference in New Issue
Block a user