Skip to content

Instantly share code, notes, and snippets.

@lawliet89
Created September 3, 2018 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lawliet89/eb85987749f754034eed228dedfb8d15 to your computer and use it in GitHub Desktop.
Save lawliet89/eb85987749f754034eed228dedfb8d15 to your computer and use it in GitHub Desktop.
Terraform Demo Snippet
# LB -> Clients
resource "aws_security_group_rule" "lb_client_egress" {
type = "egress"
from_port = "${local.client_port}"
to_port = "${local.client_port}"
protocol = "tcp"
source_security_group_id = "${aws_security_group.client.id}"
security_group_id = "${aws_security_group.lb.id}"
}
resource "aws_security_group_rule" "client_lb_inbound" {
type = "ingress"
from_port = "${local.client_port}"
to_port = "${local.client_port}"
protocol = "tcp"
source_security_group_id = "${aws_security_group.lb.id}"
security_group_id = "${aws_security_group.client.id}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment