2023-01-20 20:56:20 +08:00
{% hint style="info" %}
**NOTE**: This provider is currently has no maintainer. We are looking for
2021-03-08 00:55:15 +08:00
a volunteer. If this provider breaks it may be disabled or removed if
it can not be easily fixed.
2023-01-20 20:56:20 +08:00
{% endhint %}
2021-03-08 00:55:15 +08:00
2017-09-27 01:14:53 +08:00
## Configuration
2022-05-09 02:41:33 +08:00
To use this provider, add an entry to `creds.json` with `TYPE` set to `SOFTLAYER`
along with authentication fields.
Authenticating with SoftLayer requires at least a `username` and `api_key` for authentication. It can also optionally take a `timeout` and `endpoint_url` parameter however these are optional and will use standard defaults if not provided.
Example:
2022-02-18 01:22:31 +08:00
2023-03-03 05:17:27 +08:00
{% code title="creds.json" %}
2022-02-18 01:22:31 +08:00
```json
2017-10-11 20:33:52 +08:00
{
"softlayer": {
2022-05-09 02:41:33 +08:00
"TYPE": "SOFTLAYER",
"api_key": "mysecretapikey",
"username": "myusername"
2017-10-11 20:33:52 +08:00
}
}
2022-02-18 01:22:31 +08:00
```
2023-03-03 05:17:27 +08:00
{% endcode %}
2017-09-27 01:14:53 +08:00
2017-10-12 00:06:04 +08:00
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 ).
2017-09-27 01:14:53 +08:00
## Usage
2022-05-09 02:41:33 +08:00
2023-03-11 21:42:01 +08:00
An example configuration:
2017-09-27 01:14:53 +08:00
2023-03-11 21:42:01 +08:00
{% code title="dnsconfig.js" %}
2023-01-20 20:56:20 +08:00
```javascript
2023-05-22 01:31:35 +08:00
var REG_NONE = NewRegistrar("none");
2022-05-09 02:41:33 +08:00
var DSP_SOFTLAYER = NewDnsProvider("softlayer");
2017-09-27 01:14:53 +08:00
2022-05-09 02:41:33 +08:00
D("example.tld", registrary, DnsProvider(DSP_SOFTLAYER),
A("test", "1.2.3.4")
2017-09-27 01:14:53 +08:00
);
2022-02-18 01:22:31 +08:00
```
2023-03-11 21:42:01 +08:00
{% endcode %}
2017-09-27 01:14:53 +08:00
## Metadata
This provider does not recognize any special metadata fields unique to SoftLayer dns.
For compatibility with the pre-generated NAMESERVER fields it's recommended to set the NS TTL to 86400 such as:
2023-03-11 21:42:01 +08:00
{% code title="dnsconfig.js" %}
2023-01-20 20:56:20 +08:00
```javascript
2023-05-22 01:31:35 +08:00
var REG_NONE = NewRegistrar("none");
var DSP_SOFTLAYER = NewDnsProvider("softlayer");
2017-10-11 20:33:52 +08:00
D("example.tld", REG_NONE, DnsProvider(SOFTLAYER),
2018-09-04 22:57:11 +08:00
NAMESERVER_TTL(86400),
2017-09-27 01:14:53 +08:00
2022-05-09 02:41:33 +08:00
A("test", "1.2.3.4")
2017-09-27 01:14:53 +08:00
);
2022-02-18 01:22:31 +08:00
```
2023-03-11 21:42:01 +08:00
{% endcode %}