Created
March 30, 2020 20:36
-
-
Save jjruescas/e5e578076c93cc6f21e190d19ae79afc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "http" "myip" { | |
url = "http://ipv4.icanhazip.com" | |
} | |
resource "aws_security_group_rule" "ingress_with_cidr_blocks" { | |
... | |
ingress { | |
from_port = 5432 | |
to_port = 5432 | |
protocol = "tcp" | |
cidr_blocks = ["${chomp(data.http.myip.body)}/32"] | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment