1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00
Craig Peterson 47a4ba4d05 img
2017-03-12 16:31:48 -07:00

2.0 KiB

name layout jsId
Google cloud DNS default GCLOUD

Google cloud DNS Provider

Configuration

For Google cloud authentication, DNSControl requires a JSON 'Service Account Key' for your project. Copy the full JSON object into your creds.json like so: {% highlight json %} { "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": "dnscontrolacct@mydnsproject.iam.gserviceaccount.com", "client_id": "107996619231234567750", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://accounts.google.com/o/oauth2/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/dnscontrolsdfsdfsdf%40craigdnstest.iam.gserviceaccount.com" } } {% endhighlight %}

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

Metadata

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

Usage

Use this provider like any other DNS Provider:

{% highlight js %} var REG_NAMECOM = NewRegistrar("name.com","NAMEDOTCOM"); var GCLOUD = NewDnsProvider("gcloud", GCLOUD);

D("example.tld", REG_NAMECOM, DnsProvider(GCLOUD), A("test","1.2.3.4") ); {%endhighlight%}

Activation

  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 "App Engine Admin" rights.

  4. Download the JSON key and copy it into your creds.json under the name of your gcloud provider.