Skip to content

Instantly share code, notes, and snippets.

@DanielDaCosta
Created November 2, 2020 19:59
Show Gist options
  • Save DanielDaCosta/7417c6fbbe85f53934bda0e3f8ddb887 to your computer and use it in GitHub Desktop.
Save DanielDaCosta/7417c6fbbe85f53934bda0e3f8ddb887 to your computer and use it in GitHub Desktop.
resource "aws_security_group" "private_sg" {
name = "${var.name}-private-sg"
description = "Security Group for Private EC2 instance"
vpc_id = data.aws_vpc.selected.id
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
Name = "${var.name}-private-sg"
Product = var.name
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment