Created
April 7, 2020 09:30
-
-
Save gilmoregrills/e5265e90f0e98ba2fd81e946a1c4874b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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