Skip to content

ianbrown78/google-dns-updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python3 Google Cloud DNS Updater

This utility runs in Google Cloud Functions and allows for the remote update of DNS records from dynamic clients using a key.

Support for IPv4 and IPv6

Basic usage

Configure the application using ENV variables (Preferably with Secrets mounted at runtime)
The following configuration is required:

  app:
    0:
      apiKey: <API service key>
      hostname: <hostname associated to apiKey>
    1:
      apiKey: <API Service Key>
      hostname: <hostname associated to apiKey>

    project: <project name>
    authKeyJsonFile: <auth json file path>
    dns:
      zone: <zone name>
      domain: <domain>

Call the function using the below format (example.sh):

#!/bin/sh

IPADDRESS_V4=`curl https://api.ipify.org/?format=plain` &&
IPADDRESS_V6=`curl https://api64.ipify.org/?format=plain` &&


# example.com
curl -X POST <Function URL> -H "Content-Type:application/json" --data '{"host":"example.com.", "ipv4":"'$IPADDRESS_V4'", "ipv6":"'$IPADDRESS_V6'", "key":"<API service key>"}'

About

A python3 DNS update utility.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages