Skip to content

Instantly share code, notes, and snippets.

@100daysofdevops
Created March 2, 2019 03:32
Show Gist options
  • Select an option

  • Save 100daysofdevops/8c3ae7590a6d93a55887f2280c935026 to your computer and use it in GitHub Desktop.

Select an option

Save 100daysofdevops/8c3ae7590a6d93a55887f2280c935026 to your computer and use it in GitHub Desktop.
resource "aws_security_group" "alb-sg" {
name = "my-alb-sg"
vpc_id = "${var.vpc_id}"
}
resource "aws_security_group_rule" "http_allow" {
from_port = 80
protocol = "tcp"
security_group_id = "${aws_security_group.alb-sg.id}"
to_port = 80
type = "ingress"
cidr_blocks = ["0.0.0.0/0"]
}
resource "aws_security_group_rule" "all_outbound_access" {
from_port = 0
protocol = "-1"
security_group_id = "${aws_security_group.alb-sg.id}"
to_port = 0
type = "egress"
cidr_blocks = ["0.0.0.0/0"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment