Gcore
Last updated
Last updated
To use this provider, add an entry to creds.json
with TYPE
set to GCORE
along with a Gcore account API token.
Example:
This provider supports the following metadata fields specific to Gcore, to support Gcore's GeoDNS and failover features.
All metadata values are a string, instead of a number/int or a boolean value. If you want to set a number or a boolean value, you must specify them in their string forms.
These metadata fields can be set on each individual record:
gcore_asn
: Comma separated string of ASNs the record should be served to.
gcore_continents
: Comma separated string of continents the record should be served to. Valid values are: as,na,an,sa,oc,eu,af
.
gcore_countries
: Comma separated string of countries and regions the record should be served to. Countries and regions are represented by their two-letter code ().
gcore_latitude
and gcore_longitude
: Coordinate of the server's location the record is pointing to. Used for GeoDistance feature.
gcore_notes
: Arbitrary notes for the record.
gcore_weight
: Weight of the record, used in load balancing.
gcore_ip
: Comma separated string of IPs/CIDRs the record should be served to.
These metadata fields are shared within the same RRSet (record name and type combo). The failover metadata MUST be set on all the records within the RRSet, and MUST be exactly the same across all records.
gcore_failover_protocol
: Protocol to perform healthcheck on the server the record is pointing to. Valid values: HTTP, TCP, UDP, ICMP
gcore_failover_port
: The port (as a string) to connect to the server.
gcore_failover_frequency
: How often healthcheck should be performed, in seconds as a string. Valid values: 10-3600
gcore_failover_timeout
: How long healthcheck should wait for server's response, in seconds as a string. Valid values: 1-10
gcore_failover_method
: HTTP method used in the healthcheck. Only applies if gcore_failover_protocol
is set to HTTP
.
gcore_failover_command
: Bytes to be sent to the server in the healthcheck. Only applies if gcore_failover_protocol
is set to TCP
or UDP
.
gcore_failover_url
: Relative URL to be requested, e.g. /
. Only applies if gcore_failover_protocol
is set to HTTP
.
gcore_failover_tls
: If SSL/TLS should be used when connecting to origin server. Can be either true
or false
as a string.
gcore_failover_regexp
: Regular expression of expected contents in the response.
gcore_failover_http_status_code
: Expected HTTP status code as a string. Only applies if gcore_failover_protocol
is set to HTTP
.
gcore_failover_host
: Host field in the HTTP request header. Only applies if gcore_failover_protocol
is set to HTTP
.
The gcore_filters
metadata is a semicolon delimited string of several "filter" values.
Each filter is a comma separated string of 2 or 3 fields:
2 fields: type,strict
.
3 fields: type,strict,limit
.
As for the meaning of the fields:
type
is the type of the filter, e.g. healthcheck
, geodistance
.
strict
specifies what happens if the filter returns no records. If strict
is false
, then all records will be returned. If strict
is true
, then no records will be returned.
limit
specifies the maximum number of records to be returned. This is an optional field.
Let's take an example gcore_filters
value: healthcheck,false;geodistance,false;first_n,false,2
This example filter specifies 3 filters: healthcheck
, geodistance
, first_n
. For all three filters, the strict
field is set to false
. For first_n
filter, the max number of records to return is 2.
GCore provider will also display the record metadata in the corrections list. If you're overwhelmed by the instructions above, you can do the following instead:
Add your records manually on Gcore's DNS control panel, and set all the metadata/filters you need.
Run dnscontrol preview
. You will see DNSControl wants to delete your records:
Here DNSControl has generated all the metadata above based on your existing records.
Copy the metadata into your dnsconfig.js
file.
An example configuration:
An example configuration with metadata set:
DNSControl depends on a Gcore account API token.
You can obtain your API token on this page: