Skip to content

Instantly share code, notes, and snippets.

@gilmoregrills
Created April 7, 2020 09:30
Show Gist options
  • Save gilmoregrills/e5265e90f0e98ba2fd81e946a1c4874b to your computer and use it in GitHub Desktop.
Save gilmoregrills/e5265e90f0e98ba2fd81e946a1c4874b to your computer and use it in GitHub Desktop.
# Security Groups
data "http" "caller_ip" {
url = "http://ipv4.icanhazip.com"
}
resource "aws_security_group" "allow_http_ssh" {
name = "allow_http_ssh"
description = "Allow HTTP SSH inbound traffic"
vpc_id = "${module.vpc.vpc_id}"
ingress {
from_port = 80
to_port = 80
protocol = "TCP"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 22
to_port = 22
protocol = "TCP"
cidr_blocks = ["0.0.0.0/0"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
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