Skip to content

Instantly share code, notes, and snippets.

@theCaptN21
Created February 13, 2023 13:46
Show Gist options
  • Save theCaptN21/36cbcf3442b5182bb46619279e84e316 to your computer and use it in GitHub Desktop.
Save theCaptN21/36cbcf3442b5182bb46619279e84e316 to your computer and use it in GitHub Desktop.
Security Group
resource "aws_security_group" "allow_http" {
name = "allow_http"
description = "Allow http inbound traffic"
vpc_id = "vpc-046434f94c971bec4"
ingress {
from_port = "443"
to_port = "443"
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = "8080"
to_port = "8080"
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"]
}
ingress {
from_port = "80"
to_port = "80"
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