Files
dsk-iac/aws_instance/infra_monitoring/security_group.tf
havelight-ee 1e5b0b4487 update
2023-05-04 22:42:49 +09:00

42 lines
952 B
HCL

resource "aws_security_group" "monitoring-allow-security" {
name = "monitoring-allow-security-new"
description = "Allow inbound traffic"
vpc_id = var.VPC_ID
ingress {
description = "SSH"
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["118.223.123.161/32"]
}
ingress {
description = "TLS from monitoring"
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["118.223.123.161/32"]
}
ingress {
description = "http fron monitoring"
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["118.223.123.161/32"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
ipv6_cidr_blocks = ["::/0"]
}
tags = {
Name = "monitoring-allow-security"
}
}