* For caddy v1 in our org This RP changes all imports for caddyserver/caddy to coredns/caddy. This is the v1 code of caddy. For the coredns/caddy repo the following changes have been made: * anything not needed by us is deleted * all `telemetry` stuff is deleted * all its import paths are also changed to point to coredns/caddy * the v1 branch has been moved to the master branch * a v1.1.0 tag has been added to signal the latest release Signed-off-by: Miek Gieben <miek@miek.nl> * Fix imports Signed-off-by: Miek Gieben <miek@miek.nl> * Group coredns/caddy with out plugins Signed-off-by: Miek Gieben <miek@miek.nl> * remove this file Signed-off-by: Miek Gieben <miek@miek.nl> * Relax import ordering github.com/coredns is now also a coredns dep, this makes github.com/coredns/caddy fit more natural in the list. Signed-off-by: Miek Gieben <miek@miek.nl> * Fix final import Signed-off-by: Miek Gieben <miek@miek.nl> |
||
---|---|---|
.. | ||
clouddns.go | ||
clouddns_test.go | ||
gcp.go | ||
log_test.go | ||
README.md | ||
setup.go | ||
setup_test.go |
clouddns
Name
clouddns - enables serving zone data from GCP Cloud DNS.
Description
The clouddns plugin is useful for serving zones from resource record sets in GCP Cloud DNS. This plugin supports all Google Cloud DNS records. This plugin can be used when CoreDNS is deployed on GCP or elsewhere. Note that this plugin accesses the resource records through the Google Cloud API. For records in a privately hosted zone, it is not necessary to place CoreDNS and this plugin in the associated VPC network. In fact the private hosted zone could be created without any associated VPC and this plugin could still access the resource records under the hosted zone.
Syntax
clouddns [ZONE:PROJECT_ID:HOSTED_ZONE_NAME...] {
credentials [FILENAME]
fallthrough [ZONES...]
}
-
ZONE the name of the domain to be accessed. When there are multiple zones with overlapping domains (private vs. public hosted zone), CoreDNS does the lookup in the given order here. Therefore, for a non-existing resource record, SOA response will be from the rightmost zone.
-
PROJECT_ID the project ID of the Google Cloud project.
-
HOSTED_ZONE_NAME the name of the hosted zone that contains the resource record sets to be accessed.
-
credentials
is used for reading the credential file from FILENAME (normally a .json file). -
fallthrough
If zone matches and no record can be generated, pass request to the next plugin. If [ZONES...] is omitted, then fallthrough happens for all zones for which the plugin is authoritative. If specific zones are listed (for examplein-addr.arpa
andip6.arpa
), then only queries for those zones will be subject to fallthrough.
Examples
Enable clouddns with implicit GCP credentials and resolve CNAMEs via 10.0.0.1:
example.org {
clouddns example.org.:gcp-example-project:example-zone
forward . 10.0.0.1
}
Enable clouddns with fallthrough:
example.org {
clouddns example.org.:gcp-example-project:example-zone example.com.:gcp-example-project:example-zone-2 {
fallthrough example.gov.
}
}
Enable clouddns with multiple hosted zones with the same domain:
. {
clouddns example.org.:gcp-example-project:example-zone example.com.:gcp-example-project:other-example-zone
}