Skip to content

Instantly share code, notes, and snippets.

@halfb00t
Created December 29, 2017 11:09
Show Gist options
  • Save halfb00t/251478eefae53198a0c31fc7a78ad885 to your computer and use it in GitHub Desktop.
Save halfb00t/251478eefae53198a0c31fc7a78ad885 to your computer and use it in GitHub Desktop.
resource "aws_security_group" "pgbouncer" {
name = "${var.name}"
vpc_id = "${var.vpc_id}"
ingress {
from_port = "${var.port}"
to_port = "${var.port}"
protocol = "tcp"
//cidr_blocks = ["${data.aws_vpc.vpc.cidr_block}"]
cidr_blocks = ["0.0.0.0/0"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags {
Name = "${var.name}"
Terraform = "true"
Environment = "${terraform.workspace}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment