Blog_IMIE/ops/terraform/security-groups.tf
2018-11-01 12:05:54 +01:00

34 lines
526 B
HCL

###########################
#SECURITY GROUP
###########################
resource "aws_security_group" "allow_ssh" {
name = "allow ssh"
ingress {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
lifecycle {
create_before_destroy = true
}
}
resource "aws_security_group" "allow_http" {
name = "allow http"
ingress {
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
lifecycle {
create_before_destroy = true
}
}