Skip to content

Commit

Permalink
Update dynamic ip url to https://checkip.amazonaws.com instead of htt…
Browse files Browse the repository at this point in the history
…ps://ipinfo.io/ip since it is hosted by amazon
  • Loading branch information
bryan-bar committed Apr 29, 2024
1 parent 2b7a9a5 commit 65c8027
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions edbterraform/data/terraform/common_vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ variable "dynamic_service_ip_mask" {

variable "dynamic_service_ip_url" {
type = string
default = "https://ipinfo.io/ip"
description = "Endpoint to get the dynamic IP address."
default = "https://checkip.amazonaws.com/"
nullable = false
}

Expand All @@ -68,7 +69,7 @@ locals {
dynamic_ip = var.force_dynamic_ip ? [
"${cidrhost(
format("%s/%s",
split("/", data.http.instance_ip[0].response_body)[0], # Drop any prefined masks
split("/", chomp(data.http.instance_ip[0].response_body))[0], # Drop any prefined masks
var.dynamic_service_ip_mask),
0)
}/${var.dynamic_service_ip_mask}"
Expand Down

0 comments on commit 65c8027

Please sign in to comment.