Skip to content

Instantly share code, notes, and snippets.

@amaurybsouza
Created March 8, 2022 11:43
Show Gist options
  • Save amaurybsouza/551725d361cdb66cdc43ed37b59d27ef to your computer and use it in GitHub Desktop.
Save amaurybsouza/551725d361cdb66cdc43ed37b59d27ef to your computer and use it in GitHub Desktop.
security_group.tf
resource "aws_security_group" "server" {
name = "server_access"
vpc_id = local.vpc_id
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