Google Cloud DNS Provider


For Google cloud authentication, DNSControl requires a JSON ‘Service Account Key’ for your project. Newlines in the private key need to be replaced with \n.Copy the full JSON object into your creds.json like so:

    "gcloud": {
        "type": "service_account",
        "project_id": "mydnsproject",
        "private_key_id": "a05483aa208364c56716b384efff33c0574d365b",
        "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADL2dhlY7YZbx7tpsfksOX\nih0DbxhiQ==\n-----END PRIVATE KEY-----\n",
        "client_email": "",
        "client_id": "107996619231234567750",
        "auth_uri": "",
        "token_uri": "",
        "auth_provider_x509_cert_url": "",
        "client_x509_cert_url": ""

Note: The project_id, private_key, and client_email, are the only fields that are strictly required, but it is sometimes easier to just paste the entire json object in. Either way is fine.

See the Activation section for some tips on obtaining these credentials.


This provider does not recognize any special metadata fields unique to google cloud dns.


Use this provider like any other DNS Provider:

var REG_NAMECOM = NewRegistrar("","NAMEDOTCOM");
var GCLOUD = NewDnsProvider("gcloud", "GCLOUD");

D("example.tld", REG_NAMECOM, DnsProvider(GCLOUD),


  1. Go to your app-engine console and select the appropriate project.
  2. Go to “API Manager > Credentials”, and create a new “Service Account Key”

    New Service Account

  3. Choose an existing user, or create a new one. The user requires the “DNS Administrator” role.
  4. Download the JSON key and copy it into your creds.json under the name of your gcloud provider.

New domains

If a domain does not exist in your Google Cloud DNS account, DNSControl will not automatically add it with the create-domains account. You’ll need to do that via the control panel manually.