Skip to content

Update Route53 Setup with my dynamic IP using Google Cloud Run and terraform

Notifications You must be signed in to change notification settings

tinoschroeter/DynDNS

Repository files navigation

DynDNS Setup

last-commit GitHub Super-Linter k3s

First approach to update (Route53) DNS with my ISP dynamic IP address.

...update apex programmatically all other records are CNAMEs managed by terraform.

[workflow]

 +--------------------+
 | Kubernetes Cronjob |-------+  <-------------+  <-------------+
 |  dns-updater */5   |       |                |                |
 +--------------------+       |                |                |
                              |                |                |
                              v                |                |
                      +-------+-----+          |                |
             +------- +  CloudRun   + ------+  |                |
             |        +  Function   +       |  |                |
             v        +-------------+       v  |                |
     /-------------\                   /-------------\          |
 +-- |  IP Change  |                   |  No Change  |          |
 |   \-------------/                   \-------------/          |
 |                                                              |
 |    +--------+--------+     +--------+-------+     +----------+---------+
 +--> + Update Database + --> + Update Route53 + --> + Slack Notification +
      +--------+--------+     +--------+-------+     +----------+---------+

Route 53

Amazon Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service. It is designed to give developers and businesses an extremely reliable and cost effective way to route end users to Internet applications by translating names like www.example.com into the numeric IP addresses like 192.0.2.1 that computers use to connect to each other. Amazon Route 53 is fully compliant with IPv6 as well.

Terraform + Atlantis

My domains are managed by terraform and are applied centrally via Atlantis.

Pull request

Notes

kubectl create secret generic dnsupdater --from-literal='API_KEY=abcdefg'