terraform/examples/aws-rds/sg.tf

24 lines
429 B
HCL

resource "aws_security_group" "default" {
name = "main_rds_sg"
description = "Allow all inbound traffic"
vpc_id = "${var.vpc_id}"
ingress {
from_port = 0
to_port = 65535
protocol = "TCP"
cidr_blocks = ["${var.cidr_blocks}"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags {
Name = "${var.sg_name}"
}
}