Skip to content

Commit

Permalink
switch from ident.me to ipfy.org for the ip source
Browse files Browse the repository at this point in the history
  • Loading branch information
badjware committed Jun 1, 2020
1 parent f77f6b5 commit e5d6bc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data "aws_ami" "windows_ami" {

data "external" "local_ip" {
# curl should (hopefully) be available everywhere
program = ["curl", "https://v4.ident.me/.json"]
program = ["curl", "https://api.ipify.org?format=json"]
}

locals {
Expand Down Expand Up @@ -56,7 +56,7 @@ resource "aws_security_group_rule" "rdp_ingress" {
from_port = 3389
to_port = 3389
protocol = "tcp"
cidr_blocks = ["${data.external.local_ip.result.address}/32"]
cidr_blocks = ["${data.external.local_ip.result.ip}/32"]
security_group_id = aws_security_group.default.id
}

Expand All @@ -67,7 +67,7 @@ resource "aws_security_group_rule" "vnc_ingress" {
from_port = 5900
to_port = 5900
protocol = "tcp"
cidr_blocks = ["${data.external.local_ip.result.address}/32"]
cidr_blocks = ["${data.external.local_ip.result.ip}/32"]
security_group_id = aws_security_group.default.id
}

Expand Down

0 comments on commit e5d6bc1

Please sign in to comment.