diff --git a/documentation/ci-cd-gitlab.md b/documentation/ci-cd-gitlab.md index 19052f2e6..ba38bb680 100644 --- a/documentation/ci-cd-gitlab.md +++ b/documentation/ci-cd-gitlab.md @@ -13,31 +13,34 @@ This is based on: For convenience, both configuration files are shown below. -- `dnsconfig.js` - ```javascript - var PROVIDER_NONE = NewRegistrar('none'); - var PROVIDER_TRANSIP = NewDnsProvider('transip', '-'); +{% code title="dnsconfig.js" %} +```javascript +var PROVIDER_NONE = NewRegistrar('none'); +var PROVIDER_TRANSIP = NewDnsProvider('transip', '-'); - D('cafferata.dev', - PROVIDER_NONE, - DnsProvider(PROVIDER_TRANSIP), - DefaultTTL('1d'), - TXT('spf', [ - 'v=spf1', - '-all' - ].join(' ')) - ); - ``` -- `creds.json` - ```json - { - "transip": { - "TYPE": "TRANSIP", - "AccountName": "cafferatax", - "PrivateKey": "$TRANSIP_PRIVATE_KEY" - } - } - ``` +D('cafferata.dev', + PROVIDER_NONE, + DnsProvider(PROVIDER_TRANSIP), + DefaultTTL('1d'), + TXT('spf', [ + 'v=spf1', + '-all' + ].join(' ')) +); +``` +{% endcode %} + +{% code title="creds.json" %} +```json +{ + "transip": { + "TYPE": "TRANSIP", + "AccountName": "cafferatax", + "PrivateKey": "$TRANSIP_PRIVATE_KEY" + } +} +``` +{% endcode %} ## Gitlab CI - Preparation diff --git a/documentation/creds-json.md b/documentation/creds-json.md index 8ce0e47ae..19f6e6ef7 100644 --- a/documentation/creds-json.md +++ b/documentation/creds-json.md @@ -5,6 +5,7 @@ configuration parameters required are stored in `creds.json`. The file contain Here's a sample file: +{% code title="creds.json" %} ```json { "cloudflare_tal": { @@ -26,6 +27,7 @@ Here's a sample file: } } ``` +{% endcode %} ## Format @@ -79,6 +81,7 @@ For a smooth transition, please update your `creds.json` file now. Here is the minimal entry required: +{% code title="creds.json" %} ```json { "entryName": { @@ -86,6 +89,7 @@ Here is the minimal entry required: } } ``` +{% endcode %} ### cleanup @@ -203,6 +207,7 @@ In this case, the 1Password CLI is used to inject the secrets from a 1Password vault, rather than storing them in environment variables. An example of a template file containing Linode and Cloudflare API credentials is available here: [creds.json](https://github.com/StackExchange/dnscontrol/blob/master/documentation/assets/1password/creds.json). +{% code title="creds.json" %} ```json { "bind": { @@ -219,6 +224,7 @@ An example of a template file containing Linode and Cloudflare API credentials i } } ``` +{% endcode %} ## Don't store secrets in a Git repo! diff --git a/documentation/get-certs.md b/documentation/get-certs.md index 07c661c19..cc65fbb0f 100644 --- a/documentation/get-certs.md +++ b/documentation/get-certs.md @@ -53,6 +53,7 @@ specify any number of certificates, with up to 100 SAN entries each. Subject nam The format of the file is a simple JSON array of objects: +{% code title="certs.json" %} ```json [ { @@ -74,6 +75,7 @@ The format of the file is a simple JSON array of objects: } ] ``` +{% endcode %} `dnscontrol get-certs` will attempt to issue any certificates referenced by this file, and will renew or re-issue if the certificate we already have is close to expiry or if the set of subject names changes for a cert. diff --git a/documentation/getting-started.md b/documentation/getting-started.md index bdba935aa..5de185ae9 100644 --- a/documentation/getting-started.md +++ b/documentation/getting-started.md @@ -102,6 +102,7 @@ Modify this file to match your particular providers and domains. See [the DNSCon Create a file called `creds.json` for storing provider configurations (API tokens and other account information). For example, to use both name.com and Cloudflare, you would have: +{% code title="creds.json" %} ```json { "cloudflare": { // The provider name used in dnsconfig.js @@ -117,6 +118,7 @@ For example, to use both name.com and Cloudflare, you would have: "none": { "TYPE": "NONE" } // The no-op provider } ``` +{% endcode %} Note: Do **not** store your `creds.json` file in Git unencrypted. That is unsafe. Add `creds.json` to your @@ -150,6 +152,7 @@ and renaming it. The file looks like: +{% code title="creds.json" %} ```json { "bind": { @@ -162,6 +165,7 @@ The file looks like: } } ``` +{% endcode %} Ignore the `r53_accountname` section. It is a placeholder and will be ignored. You can use it later when you define your first set of API credentials. @@ -183,11 +187,13 @@ jq . < creds.json FYI: `creds.json` fields can be read from an environment variable. The field must begin with a `$` followed by the variable name. No other text. For example: +{% code title="creds.json" %} ```json { "apikey": "$GANDI_V5_APIKEY" } ``` +{% endcode %} ## 5. Test the sample files diff --git a/documentation/notifications.md b/documentation/notifications.md index 875cc8fd6..3206b06e3 100644 --- a/documentation/notifications.md +++ b/documentation/notifications.md @@ -9,6 +9,7 @@ new types or destinations. Notifications are set up in your credentials JSON file. They will use the `notifications` key to look for keys or configuration needed for various notification types. +{% code title="creds.json" %} ```json "r53": { ... @@ -21,6 +22,7 @@ Notifications are set up in your credentials JSON file. They will use the `notif "teams_url": "https://outlook.office.com/webhook/00000000-0000-0000-0000-000000000000@00000000-0000-0000-0000-000000000000/IncomingWebhook/00000000000000000000000000000000/00000000-0000-0000-0000-000000000000" } ``` +{% endcode %} You also must run `dnscontrol preview` or `dnscontrol push` with the `-notify` flag to enable notification sending at all. diff --git a/documentation/providers/akamaiedgedns.md b/documentation/providers/akamaiedgedns.md index 9f48d41f4..5e46f31b9 100644 --- a/documentation/providers/akamaiedgedns.md +++ b/documentation/providers/akamaiedgedns.md @@ -19,6 +19,7 @@ To use this provider, add an entry to `creds.json` with `TYPE` set to `AKAMAIEDG Example: +{% code title="creds.json" %} ```json "akamaiedgedns": { "TYPE": "AKAMAIEDGEDNS", @@ -30,6 +31,7 @@ Example: "group_id": "NNNNNN" } ``` +{% endcode %} ## Usage diff --git a/documentation/providers/autodns.md b/documentation/providers/autodns.md index df6545616..6c04adb50 100644 --- a/documentation/providers/autodns.md +++ b/documentation/providers/autodns.md @@ -5,6 +5,7 @@ To use this provider, add an entry to `creds.json` with `TYPE` set to `AUTODNS` Example: +{% code title="creds.json" %} ```json { "autodns": { @@ -15,6 +16,7 @@ Example: } } ``` +{% endcode %} ## Usage diff --git a/documentation/providers/axfrddns.md b/documentation/providers/axfrddns.md index 8d2ef059d..13b702462 100644 --- a/documentation/providers/axfrddns.md +++ b/documentation/providers/axfrddns.md @@ -33,6 +33,7 @@ the provider: For instance, your `creds.json` might looks like: +{% code title="creds.json" %} ```json { "axfrddns": { @@ -42,6 +43,7 @@ For instance, your `creds.json` might looks like: } } ``` +{% endcode %} If either key is missing, DNSControl defaults to IP-based ACL authentication for that function. Including both keys is the most @@ -58,6 +60,7 @@ var DSP_AXFRDDNS_B = NewDnsProvider("axfrddns-b"); And update `creds.json` accordingly: +{% code title="creds.json" %} ```json { "axfrddns-a": { @@ -70,6 +73,7 @@ And update `creds.json` accordingly: } } ``` +{% endcode %} ### Default nameservers diff --git a/documentation/providers/azure_dns.md b/documentation/providers/azure_dns.md index 5b3a91f85..dca2b1d0a 100644 --- a/documentation/providers/azure_dns.md +++ b/documentation/providers/azure_dns.md @@ -5,6 +5,7 @@ along with the API credentials. Example: +{% code title="creds.json" %} ```json { "azuredns_main": { @@ -17,6 +18,7 @@ Example: } } ``` +{% endcode %} You can also use environment variables: @@ -28,6 +30,7 @@ export AZURE_CLIENT_ID=AAAAAAAAA export AZURE_CLIENT_SECRET=BBBBBBBBB ``` +{% code title="creds.json" %} ```json { "azuredns_main": { @@ -40,6 +43,7 @@ export AZURE_CLIENT_SECRET=BBBBBBBBB } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to Azure DNS. diff --git a/documentation/providers/bind.md b/documentation/providers/bind.md index 20030c587..f26bf6818 100644 --- a/documentation/providers/bind.md +++ b/documentation/providers/bind.md @@ -17,6 +17,7 @@ Optional fields include: Example: +{% code title="creds.json" %} ```json { "bind": { @@ -25,7 +26,7 @@ Example: } } ``` - +{% endcode %} ## Meta configuration diff --git a/documentation/providers/cloudflareapi.md b/documentation/providers/cloudflareapi.md index bc30dd9a9..c30162824 100644 --- a/documentation/providers/cloudflareapi.md +++ b/documentation/providers/cloudflareapi.md @@ -16,6 +16,7 @@ Optional fields include: Example: +{% code title="creds.json" %} ```json { "cloudflare": { @@ -25,6 +26,7 @@ Example: } } ``` +{% endcode %} # Authentication @@ -39,6 +41,7 @@ provide a [Cloudflare API token](https://dash.cloudflare.com/profile/api-tokens) This method is enabled by setting the `apitoken` value in `creds.json`: +{% code title="creds.json" %} ```json { "cloudflare": { @@ -48,6 +51,7 @@ This method is enabled by setting the `apitoken` value in `creds.json`: } } ``` +{% endcode %} * `accountid` is found in the Cloudflare portal ("Account ID") on any "Website" page. Click on any site and you'll see the "Account ID" on the lower right side of the page. * `apitoken` is something you must create. See [Cloudflare's documentation](https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys) for instructions on how to generate and configure permissions on API tokens. (Spoiler alert: [link](https://dash.cloudflare.com/profile/api-tokens). The token must be granted rights (authorization to do certain tasks) at a very granular level. @@ -74,6 +78,7 @@ This method is not recommended because these credentials give DNSControl access This method is enabled by setting the `apikey` and `apiuser` values in `creds.json`: +{% code title="creds.json" %} ```json { "cloudflare": { @@ -84,6 +89,8 @@ This method is enabled by setting the `apikey` and `apiuser` values in `creds.js } } ``` +{% endcode %} + * `accountid` (see above) * `apiuser` is the email address associated with the account. * `apikey` is found on [My Profile / API Tokens](https://dash.cloudflare.com/profile/api-tokens). diff --git a/documentation/providers/cloudns.md b/documentation/providers/cloudns.md index 97df1fe21..ea105f1cc 100644 --- a/documentation/providers/cloudns.md +++ b/documentation/providers/cloudns.md @@ -5,6 +5,7 @@ along with your [Api user ID and password](https://www.cloudns.net/wiki/article/ Example: +{% code title="creds.json" %} ```json { "cloudns": { @@ -15,6 +16,7 @@ Example: } } ``` +{% endcode %} Current version of provider doesn't support `sub-auth-user`. diff --git a/documentation/providers/cscglobal.md b/documentation/providers/cscglobal.md index 76c6aff53..50ff84cad 100644 --- a/documentation/providers/cscglobal.md +++ b/documentation/providers/cscglobal.md @@ -15,6 +15,7 @@ In your `creds.json` file, you must provide your API key and user/client token. Example: +{% code title="creds.json" %} ```json { "cscglobal": { @@ -25,6 +26,7 @@ Example: } } ``` +{% endcode %} ## Usage An example `dnsconfig.js` configuration: diff --git a/documentation/providers/desec.md b/documentation/providers/desec.md index f794ca288..11ee9ff5a 100644 --- a/documentation/providers/desec.md +++ b/documentation/providers/desec.md @@ -5,6 +5,7 @@ along with a deSEC account auth token. Example: +{% code title="creds.json" %} ```json { "desec": { @@ -13,6 +14,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to deSEC. diff --git a/documentation/providers/digitalocean.md b/documentation/providers/digitalocean.md index 1ce75774a..e48d4a17e 100644 --- a/documentation/providers/digitalocean.md +++ b/documentation/providers/digitalocean.md @@ -5,6 +5,7 @@ along with your [DigitalOcean OAuth Token](https://cloud.digitalocean.com/settin Example: +{% code title="creds.json" %} ```json { "mydigitalocean": { @@ -13,6 +14,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to DigitalOcean. diff --git a/documentation/providers/dnsimple.md b/documentation/providers/dnsimple.md index 8c89e799d..ef429fd0e 100644 --- a/documentation/providers/dnsimple.md +++ b/documentation/providers/dnsimple.md @@ -7,6 +7,7 @@ You can also set the `baseurl` to use [DNSimple's free sandbox](https://develope Examples: +{% code title="creds.json" %} ```json { "dnsimple": { @@ -20,6 +21,7 @@ Examples: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to DNSimple. diff --git a/documentation/providers/dnsmadeeasy.md b/documentation/providers/dnsmadeeasy.md index 03983ba8f..6271eba29 100644 --- a/documentation/providers/dnsmadeeasy.md +++ b/documentation/providers/dnsmadeeasy.md @@ -5,6 +5,7 @@ along with your `api_key` and `secret_key`. More info about authentication can b Example: +{% code title="creds.json" %} ```json { "dnsmadeeasy": { @@ -14,6 +15,7 @@ Example: } } ``` +{% endcode %} ## Records diff --git a/documentation/providers/dnsoverhttps.md b/documentation/providers/dnsoverhttps.md index 9a641255b..2f6c5b069 100644 --- a/documentation/providers/dnsoverhttps.md +++ b/documentation/providers/dnsoverhttps.md @@ -4,6 +4,7 @@ This is a read-only/monitoring "registrar". It does a DNS NS lookup to confirm t To use this provider, add an entry to `creds.json` with `TYPE` set to `DNSOVERHTTPS`. +{% code title="creds.json" %} ```json { "dohdefault": { @@ -11,11 +12,13 @@ To use this provider, add an entry to `creds.json` with `TYPE` set to `DNSOVERHT } } ``` +{% endcode %} The DNS-over-HTTPS provider defaults to using Google Public DNS however you may configure an alternative RFC 8484 DoH provider using the `host` parameter. Example: +{% code title="creds.json" %} ```json { "dohcloudflare": { @@ -24,6 +27,7 @@ Example: } } ``` +{% endcode %} Some common DoH providers are: diff --git a/documentation/providers/domainnameshop.md b/documentation/providers/domainnameshop.md index a9b4eb409..93e6cefd9 100644 --- a/documentation/providers/domainnameshop.md +++ b/documentation/providers/domainnameshop.md @@ -5,6 +5,7 @@ along with your [Domainnameshop Token and Secret](https://www.domeneshop.no/admi Example: +{% code title="creds.json" %} ```json { "mydomainnameshop": { @@ -14,6 +15,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to Domainnameshop. diff --git a/documentation/providers/easyname.md b/documentation/providers/easyname.md index b358ba39a..fafb8391a 100644 --- a/documentation/providers/easyname.md +++ b/documentation/providers/easyname.md @@ -7,6 +7,7 @@ along with [API-Access](https://my.easyname.com/en/account/api) information Example: +{% code title="creds.json" %} ```json { "easyname": { @@ -19,6 +20,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to easyname. diff --git a/documentation/providers/gandi_v5.md b/documentation/providers/gandi_v5.md index ae4d15944..fe1aceeff 100644 --- a/documentation/providers/gandi_v5.md +++ b/documentation/providers/gandi_v5.md @@ -28,6 +28,7 @@ https://admin.gandi.net/organizations/[not this hex string]/PLTS/[sharing id]/pr Example: +{% code title="creds.json" %} ```json { "gandi": { @@ -37,6 +38,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to Gandi. diff --git a/documentation/providers/gcloud.md b/documentation/providers/gcloud.md index 14f69fb1d..246bcf574 100644 --- a/documentation/providers/gcloud.md +++ b/documentation/providers/gcloud.md @@ -9,6 +9,7 @@ Copy the full JSON object into your `creds.json`. Newlines in the private key ne Example: +{% code title="creds.json" %} ```json { "gcloud": { @@ -27,6 +28,7 @@ Example: } } ``` +{% endcode %} **Note**: diff --git a/documentation/providers/gcore.md b/documentation/providers/gcore.md index 65581b090..dc783e9c8 100644 --- a/documentation/providers/gcore.md +++ b/documentation/providers/gcore.md @@ -5,6 +5,7 @@ along with a Gcore account API token. Example: +{% code title="creds.json" %} ```json { "gcore": { @@ -13,6 +14,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to Gcore. diff --git a/documentation/providers/hedns.md b/documentation/providers/hedns.md index 96f23bcda..64a90e773 100644 --- a/documentation/providers/hedns.md +++ b/documentation/providers/hedns.md @@ -10,6 +10,7 @@ along with your `dns.he.net` account username and password. These are the same username and password used to login to the [web interface](https://dns.he.net). +{% code title="creds.json" %} ```json { "hedns": { @@ -19,12 +20,14 @@ and password used to login to the [web interface](https://dns.he.net). } } ``` +{% endcode %} ### Two factor authentication If two-factor authentication has been enabled on your account you will also need to provide a valid TOTP code. This can also be done via an environment variable: +{% code title="creds.json" %} ```json { "hedns": { @@ -35,6 +38,7 @@ This can also be done via an environment variable: } } ``` +{% endcode %} and then you can run @@ -51,6 +55,7 @@ only available when first enabling two-factor authentication. * Storing the shared secret together with the password weakens two factor authentication because both factors are stored in a single place. +{% code title="creds.json" %} ```json { "hedns":{ @@ -60,6 +65,7 @@ only available when first enabling two-factor authentication. } } ``` +{% endcode %} ### Persistent Sessions @@ -78,6 +84,7 @@ This option is disabled by default when this key is not present, *full* access to your Hurrican Electric account and will be able to modify and delete your DNS entries. * It should be stored in a location only trusted users can access. +{% code title="creds.json" %} ```json { "hedns":{ @@ -88,7 +95,7 @@ This option is disabled by default when this key is not present, } } ``` - +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to Hurricane Electric DNS. diff --git a/documentation/providers/hetzner.md b/documentation/providers/hetzner.md index 1ade01471..748c1a81b 100644 --- a/documentation/providers/hetzner.md +++ b/documentation/providers/hetzner.md @@ -5,6 +5,7 @@ along with a [Hetzner API Key](https://dns.hetzner.com/settings/api-token). Example: +{% code title="creds.json" %} ```json { "hetzner": { @@ -13,6 +14,7 @@ Example: } } ``` +{% endcode %} ## Metadata @@ -81,6 +83,7 @@ Example: Your per minute quota is 60 requests and in your settings you In your `creds.json` for all `HETZNER` provider entries: +{% code title="creds.json" %} ```json { "hetzner": { @@ -90,6 +93,7 @@ In your `creds.json` for all `HETZNER` provider entries: } } ``` +{% endcode %} Every response from the Hetzner DNS Console API includes your limits: @@ -114,6 +118,7 @@ With `start_with_default_rate_limit` DNSControl uses a quota equivalent to In your `creds.json` for all `HETZNER` provider entries: +{% code title="creds.json" %} ```json { "hetzner": { @@ -123,3 +128,4 @@ In your `creds.json` for all `HETZNER` provider entries: } } ``` +{% endcode %} diff --git a/documentation/providers/hexonet.md b/documentation/providers/hexonet.md index 1acf6660c..c30e83c12 100644 --- a/documentation/providers/hexonet.md +++ b/documentation/providers/hexonet.md @@ -14,6 +14,7 @@ along with your HEXONET login data. Example: +{% code title="creds.json" %} ```json { "hexonet": { @@ -26,9 +27,11 @@ Example: } } ``` +{% endcode %} Here a working example for our OT&E System: +{% code title="creds.json" %} ```json { "hexonet": { @@ -40,6 +43,7 @@ Here a working example for our OT&E System: } } ``` +{% endcode %} {% hint style="info" %} **NOTE**: The above credentials are known to the public. diff --git a/documentation/providers/hostingde.md b/documentation/providers/hostingde.md index 274dd86af..4d145bb85 100644 --- a/documentation/providers/hostingde.md +++ b/documentation/providers/hostingde.md @@ -5,6 +5,7 @@ along with your [`authToken` and optionally an `ownerAccountId`](https://www.hos Example: +{% code title="creds.json" %} ```json { "hosting.de": { @@ -13,6 +14,7 @@ Example: } } ``` +{% endcode %} ## Usage @@ -36,6 +38,7 @@ Using them requires setting the `baseURL` and (optionally) overriding the defaul An example `creds.json` configuration: +{% code title="creds.json" %} ```json { "http.net": { @@ -45,6 +48,7 @@ An example `creds.json` configuration: } } ``` +{% endcode %} An example `dnsconfig.js` configuration: diff --git a/documentation/providers/internetbs.md b/documentation/providers/internetbs.md index 6b53b7ec9..6824345b8 100644 --- a/documentation/providers/internetbs.md +++ b/documentation/providers/internetbs.md @@ -7,6 +7,7 @@ along with an API key and account password. Example: +{% code title="creds.json" %} ```json { "internetbs": { @@ -16,6 +17,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to Internet.bs. diff --git a/documentation/providers/inwx.md b/documentation/providers/inwx.md index 34fe58944..1adf4bae7 100644 --- a/documentation/providers/inwx.md +++ b/documentation/providers/inwx.md @@ -7,6 +7,7 @@ along with your INWX username and password. Example: +{% code title="creds.json" %} ```json { "inwx": { @@ -16,6 +17,7 @@ Example: } } ``` +{% endcode %} ### Two factor authentication @@ -31,6 +33,7 @@ See issue [issue 848](https://github.com/StackExchange/dnscontrol/issues/848#iss If two factor authentication has been enabled you will also need to provide a valid TOTP number. This can also be done via an environment variable: +{% code title="creds.json" %} ```json { "inwx": { @@ -41,6 +44,7 @@ This can also be done via an environment variable: } } ``` +{% endcode %} and then you can run @@ -55,6 +59,7 @@ This secret is only shown once when two factor authentication is enabled and you * Anyone with access to this `creds.json` file will have *full* access to your INWX account and will be able to transfer and/or delete your domains * Storing the shared secret together with the password weakens two factor authentication because both factors are stored in a single place. +{% code title="creds.json" %} ```json { "inwx": { @@ -65,12 +70,13 @@ This secret is only shown once when two factor authentication is enabled and you } } ``` - +{% endcode %} ### Sandbox You can optionally also specify sandbox with a value of 1 to redirect all requests to the sandbox API instead: +{% code title="creds.json" %} ```json { "inwx":{ @@ -80,6 +86,7 @@ redirect all requests to the sandbox API instead: } } ``` +{% endcode %} If sandbox is omitted or set to any other value the production API will be used. diff --git a/documentation/providers/linode.md b/documentation/providers/linode.md index 383dd8800..e0dce733c 100644 --- a/documentation/providers/linode.md +++ b/documentation/providers/linode.md @@ -5,6 +5,7 @@ along with your [Linode Personal Access Token](https://cloud.linode.com/profile/ Example: +{% code title="creds.json" %} ```json { "linode": { @@ -13,6 +14,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to Linode. diff --git a/documentation/providers/msdns.md b/documentation/providers/msdns.md index b87ec33a1..84c91a84a 100644 --- a/documentation/providers/msdns.md +++ b/documentation/providers/msdns.md @@ -34,6 +34,7 @@ along with other settings: Example: +{% code title="creds.json" %} ```json { "msdns": { @@ -43,6 +44,7 @@ Example: } } ``` +{% endcode %} An example DNS configuration: diff --git a/documentation/providers/namecheap.md b/documentation/providers/namecheap.md index e33e35a24..d62f24fd7 100644 --- a/documentation/providers/namecheap.md +++ b/documentation/providers/namecheap.md @@ -7,6 +7,7 @@ along with your Namecheap API username and key: Example: +{% code title="creds.json" %} ```json { "namecheap": { @@ -16,10 +17,12 @@ Example: } } ``` +{% endcode %} You can optionally specify BaseURL to use a different endpoint - typically the sandbox: +{% code title="creds.json" %} ```json { "namecheapSandbox": { @@ -30,6 +33,7 @@ sandbox: } } ``` +{% endcode %} if BaseURL is omitted, the production namecheap URL is assumed. diff --git a/documentation/providers/namedotcom.md b/documentation/providers/namedotcom.md index 14f0595b2..408fcdd45 100644 --- a/documentation/providers/namedotcom.md +++ b/documentation/providers/namedotcom.md @@ -11,6 +11,7 @@ along with your name.com API username and access token: Example: +{% code title="creds.json" %} ```json { "name.com": { @@ -20,6 +21,7 @@ Example: } } ``` +{% endcode %} There is another key name `apiurl` but it is optional and defaults to the correct value. If you want to use the test environment ("OT&E"), then add this: diff --git a/documentation/providers/netcup.md b/documentation/providers/netcup.md index 947382d7b..99382f165 100644 --- a/documentation/providers/netcup.md +++ b/documentation/providers/netcup.md @@ -5,6 +5,7 @@ along with your [api key, password and your customer number](https://www.netcup- Example: +{% code title="creds.json" %} ```json { "netcup": { @@ -15,6 +16,7 @@ Example: } } ``` +{% endcode %} ## Usage An example `dnsconfig.js` configuration: diff --git a/documentation/providers/netlify.md b/documentation/providers/netlify.md index 96ed35716..7d2298c6e 100644 --- a/documentation/providers/netlify.md +++ b/documentation/providers/netlify.md @@ -6,6 +6,7 @@ account slug. This is _typically_ your username on Netlify. Examples: +{% code title="creds.json" %} ```json { "netlify": { @@ -15,6 +16,7 @@ Examples: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to Netlify. diff --git a/documentation/providers/ns1.md b/documentation/providers/ns1.md index 2aebfc6a4..23d01f9f5 100644 --- a/documentation/providers/ns1.md +++ b/documentation/providers/ns1.md @@ -5,6 +5,7 @@ along with your NS1 api key. Example: +{% code title="creds.json" %} ```json { "ns1": { @@ -13,6 +14,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to NS1. diff --git a/documentation/providers/oracle.md b/documentation/providers/oracle.md index e69fa0655..4576810b8 100644 --- a/documentation/providers/oracle.md +++ b/documentation/providers/oracle.md @@ -8,6 +8,7 @@ The OCID of the compartment DNS resources should be put in can also optionally b Example: +{% code title="creds.json" %} ```json { "oracle": { @@ -21,6 +22,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to Oracle Cloud. diff --git a/documentation/providers/ovh.md b/documentation/providers/ovh.md index 9a0fe8502..550a6f9cc 100644 --- a/documentation/providers/ovh.md +++ b/documentation/providers/ovh.md @@ -5,6 +5,7 @@ along with a OVH app-key, app-secret-key and consumer-key. Example: +{% code title="creds.json" %} ```json { "ovh": { @@ -15,6 +16,7 @@ Example: } } ``` +{% endcode %} See [the Activation section](#activation) for details on obtaining these credentials. @@ -95,6 +97,7 @@ curl -XPOST -H"X-Ovh-Application: " -H "Content-type: application/j It should return something akin to: +{% code title="creds.json" %} ```json { "validationUrl": "https://eu.api.ovh.com/auth/?credentialToken=", @@ -102,6 +105,7 @@ It should return something akin to: "state": "pendingValidation" } ``` +{% endcode %} Open the "validationUrl" in a browser and log in with your OVH account. This will link the app with your account, authorizing it to access your zones and domains. diff --git a/documentation/providers/packetframe.md b/documentation/providers/packetframe.md index c8fe70aad..6bff718f8 100644 --- a/documentation/providers/packetframe.md +++ b/documentation/providers/packetframe.md @@ -5,6 +5,7 @@ along with your Packetframe Token which can be extracted from the `token` cookie Example: +{% code title="creds.json" %} ```json { "packetframe": { @@ -13,6 +14,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to Packetframe. diff --git a/documentation/providers/porkbun.md b/documentation/providers/porkbun.md index 607bb8b74..d2713ae43 100644 --- a/documentation/providers/porkbun.md +++ b/documentation/providers/porkbun.md @@ -5,6 +5,7 @@ along with your `api_key` and `secret_key`. More info about authentication can b Example: +{% code title="creds.json" %} ```json { "porkbun": { @@ -14,6 +15,7 @@ Example: } } ``` +{% endcode %} ## Metadata diff --git a/documentation/providers/powerdns.md b/documentation/providers/powerdns.md index 366d9f7c7..abc30cc30 100644 --- a/documentation/providers/powerdns.md +++ b/documentation/providers/powerdns.md @@ -6,6 +6,7 @@ In most cases the Server id is `localhost`. Example: +{% code title="creds.json" %} ```json { "powerdns": { @@ -16,6 +17,7 @@ Example: } } ``` +{% endcode %} ## Metadata Following metadata are available: diff --git a/documentation/providers/route53.md b/documentation/providers/route53.md index f7b9f9fb3..ce33245f7 100644 --- a/documentation/providers/route53.md +++ b/documentation/providers/route53.md @@ -5,6 +5,7 @@ along with API credentials. Example: +{% code title="creds.json" %} ```json { "r53_main": { @@ -16,6 +17,7 @@ Example: } } ``` +{% endcode %} Alternatively you can also use environment variables. This is discouraged unless your environment provides them already. @@ -25,6 +27,7 @@ export AWS_SECRET_ACCESS_KEY=YYYYYYYYY export AWS_SESSION_TOKEN=ZZZZZZZZ ``` +{% code title="creds.json" %} ```json { "r53_main": { @@ -34,6 +37,7 @@ export AWS_SESSION_TOKEN=ZZZZZZZZ } } ``` +{% endcode %} Alternatively, this provider supports [named profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html). In that case export the following variable: @@ -45,6 +49,7 @@ and provide a minimal entry in `creds.json`: Example: +{% code title="creds.json" %} ```json { "r53_main": { @@ -52,6 +57,7 @@ Example: } } ``` +{% endcode %} You can find some other ways to authenticate to Route53 in the [go sdk configuration](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html). diff --git a/documentation/providers/rwth.md b/documentation/providers/rwth.md index 06467c0ad..46b90204d 100644 --- a/documentation/providers/rwth.md +++ b/documentation/providers/rwth.md @@ -5,6 +5,7 @@ along with your [API Token](https://noc-portal.rz.rwth-aachen.de/dns-admin/en/ap Example: +{% code title="creds.json" %} ```json { "rwth": { @@ -13,6 +14,7 @@ Example: } } ``` +{% endcode %} ## Metadata This provider does not recognize any special metadata fields unique to it. diff --git a/documentation/providers/softlayer.md b/documentation/providers/softlayer.md index 778d56eef..ed204b6f6 100644 --- a/documentation/providers/softlayer.md +++ b/documentation/providers/softlayer.md @@ -12,6 +12,7 @@ Authenticating with SoftLayer requires at least a `username` and `api_key` for a Example: +{% code title="creds.json" %} ```json { "softlayer": { @@ -21,6 +22,7 @@ Example: } } ``` +{% endcode %} To maintain compatibility with existing softlayer CLI services these can also be provided by the `SL_USERNAME` and `SL_API_KEY` environment variables or specified in the `~/.softlayer`, but this is discouraged. More information about these methods can be found at [the softlayer-go library documentation](https://github.com/softlayer/softlayer-go#sessions). diff --git a/documentation/providers/transip.md b/documentation/providers/transip.md index 97cdf0156..2ce3a2e14 100644 --- a/documentation/providers/transip.md +++ b/documentation/providers/transip.md @@ -9,6 +9,7 @@ You can login with your `AccountName` and a `PrivateKey` which can be generated Example: +{% code title="creds.json" %} ```json { "transip": { @@ -18,12 +19,13 @@ Example: } } ``` +{% endcode %} ### Access tokens Or you can choose to have an `AccessToken` as credential. These can be generated in the [TransIP control panel](https://www.transip.nl/cp/account/api/) and have a limited lifetime - +{% code title="creds.json" %} ```json { "transip": { @@ -32,7 +34,7 @@ Or you can choose to have an `AccessToken` as credential. These can be generated } } ``` - +{% endcode %} ## Metadata diff --git a/documentation/providers/vultr.md b/documentation/providers/vultr.md index f9542fb2b..db0068711 100644 --- a/documentation/providers/vultr.md +++ b/documentation/providers/vultr.md @@ -5,6 +5,7 @@ along with a Vultr personal access token. Example: +{% code title="creds.json" %} ```json { "vultr": { @@ -13,6 +14,7 @@ Example: } } ``` +{% endcode %}` ## Metadata