GoogleCloudPlatform/chef-google-dns

Name: chef-google-dns

Owner: Google Cloud Platform

Description: null

Created: 2017-06-22 19:49:26.0

Updated: 2018-05-10 22:04:20.0

Pushed: 2018-05-01 19:07:55.0

Homepage: null

Size: 64

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Google Cloud DNS Chef Cookbook

This cookbook provides the built-in types and services for Chef to manage Google Cloud DNS resources, as native Chef types.

Requirements
Platforms
Supported Operating Systems

This cookbook was tested on the following operating systems:

Example
h_credential 'mycred' do
tion :serviceaccount
th ENV['CRED_PATH'] # e.g. '/path/to/my_account.json'
opes [
'https://www.googleapis.com/auth/ndev.clouddns.readwrite'



_managed_zone 'testzone-3-com' do
tion :create
s_name 'test.somewild-example.com.'
scription 'Test Example Zone'
edential 'mycred'
oject 'google.com:graphite-playground'


_resource_record_set 'www.testzone-4.com.' do
tion :create
naged_zone 'testzone-3-com'
pe 'A'
l 600
rget [
'10.1.2.3',
'40.5.6.7',
'80.9.10.11'

oject 'google.com:graphite-playground'
edential 'mycred'

Credentials

All Google Cloud Platform cookbooks use an unified authentication mechanism, provided by the google-gauth cookbook. Don't worry, it is automatically installed when you install this module.

Example
h_credential 'mycred' do
tion :serviceaccount
th ENV['CRED_PATH'] # e.g. '/path/to/my_account.json'
opes [
'https://www.googleapis.com/auth/ndev.clouddns.readwrite'


For complete details of the authentication cookbook, visit the google-gauth cookbook documentation.

Resources
gdns_managed_zone

A zone is a subtree of the DNS namespace under one administrative responsibility. A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service.

Example
_managed_zone 'testzone-3-com' do
tion :create
s_name 'test.somewild-example.com.'
scription 'Test Example Zone'

You can also set output-only values as well. Chef will ignore the values
when creating the resource, but will assert that its value matches what you
specified.

This important to ensure that, for example, the top-level registrar is using
the correct DNS server names. Although this can cause failures in a run from
a clean project, it is useful to ensure that there are no mismatches in the
different services.

id 579_667_184_320_567_887
name_servers [
  'ns-cloud-b1.googledomains.com.',
  'ns-cloud-b2.googledomains.com.',
  'ns-cloud-b3.googledomains.com.',
  'ns-cloud-b4.googledomains.com.'
]
creation_time '2016-12-02T04:59:24.333Z'

oject 'google.com:graphite-playground'
edential 'mycred'

Reference
_managed_zone 'id-for-resource' do
eation_time   time
scription     string
s_name        string
              integer
me            string
me_server_set [
string,
...

me_servers    [
string,
...

oject         string
edential      reference to gauth_credential

Actions Properties Label

Set the mz_label property when attempting to set primary key of this object. The primary key will always be referred to by the initials of the resource followed by “_label”

gdns_project

A project resource. The project is a top level container for resources including Cloud DNS ManagedZones.

Example
sures a project exists and has the correct values.

l project settings are read-only, yet we are setting them anyway. Chef will
e these values to check if they match, and fail the run otherwise.

is important to ensure that your project quotas are set properly and avoid
screpancies from it to fail in production.
_project 'google.com:graphite-playground' do
ota_managed_zones 10_000
ota_total_rrdata_size_per_change 100_000
oject 'google.com:graphite-playground'
edential 'mycred'

Reference
_project 'id-for-resource' do
mber                             integer
ota_managed_zones                integer
ota_resource_records_per_rrset   integer
ota_rrset_additions_per_change   integer
ota_rrset_deletions_per_change   integer
ota_rrsets_per_managed_zone      integer
ota_total_rrdata_size_per_change integer
oject                            string
edential                         reference to gauth_credential

Actions Properties Label

Set the p_label property when attempting to set primary key of this object. The primary key will always be referred to by the initials of the resource followed by “_label”

gdns_resource_record_set

A single DNS record that exists on a domain name (i.e. in a managed zone). This record defines the information about the domain and where the domain / subdomains direct to.

The record will include the domain/subdomain name, a type (i.e. A, AAA, CAA, MX, CNAME, NS, etc)

Example
e property managed_zone below needs to match a gdns_managed_zone recipe
ock executed before it
_resource_record_set 'www.testzone-4.com.' do
tion :create
naged_zone 'testzone-4-com'
pe 'A'
l 600
rget [
'10.1.2.3',
'40.5.6.7',
'80.9.10.11'

oject 'google.com:graphite-playground'
edential 'mycred'


_resource_record_set 'sites.testzone-4.com.' do
tion :create
naged_zone 'testzone-4-com'
pe 'CNAME'
rget ['www.testzone-4.com.']
oject 'google.com:graphite-playground'
edential 'mycred'

Reference
_resource_record_set 'id-for-resource' do
naged_zone reference to gdns_managed_zone
me         string
rget       [
string,
...

l          integer
pe         'A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NAPTR', 'NS', 'PTR', 'SOA', 'SPF', 'SRV' or 'TXT'
oject      string
edential   reference to gauth_credential

Actions Properties Label

Set the rrs_label property when attempting to set primary key of this object. The primary key will always be referred to by the initials of the resource followed by “_label”


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.