2023-01-20 13:56:20 +01:00
{% hint style="info" %}
**NOTE**: This provider is currently has no maintainer. We are looking for
2021-03-07 11:55:15 -05:00
a volunteer. If this provider breaks it may be disabled or removed if
it can not be easily fixed.
2023-01-20 13:56:20 +01:00
{% endhint %}
2021-03-07 11:55:15 -05:00
2017-09-27 03:14:53 +10:00
## Configuration
2022-05-08 14:41:33 -04: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-17 18:22:31 +01:00
2023-03-02 22:17:27 +01:00
{% code title="creds.json" %}
2022-02-17 18:22:31 +01:00
```json
2017-10-11 08:33:52 -04:00
{
"softlayer": {
2022-05-08 14:41:33 -04:00
"TYPE": "SOFTLAYER",
"api_key": "mysecretapikey",
"username": "myusername"
2017-10-11 08:33:52 -04:00
}
}
2022-02-17 18:22:31 +01:00
```
2023-03-02 22:17:27 +01:00
{% endcode %}
2017-09-27 03:14:53 +10:00
2017-10-11 12:06:04 -04: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 03:14:53 +10:00
## Usage
2022-05-08 14:41:33 -04:00
2023-03-11 14:42:01 +01:00
An example configuration:
2017-09-27 03:14:53 +10:00
2023-03-11 14:42:01 +01:00
{% code title="dnsconfig.js" %}
2023-01-20 13:56:20 +01:00
```javascript
2023-05-21 19:31:35 +02:00
var REG_NONE = NewRegistrar("none");
2022-05-08 14:41:33 -04:00
var DSP_SOFTLAYER = NewDnsProvider("softlayer");
2017-09-27 03:14:53 +10:00
2023-06-17 14:58:17 +02:00
D("example.com", REG_NONE, DnsProvider(DSP_SOFTLAYER),
2022-05-08 14:41:33 -04:00
A("test", "1.2.3.4")
2017-09-27 03:14:53 +10:00
);
2022-02-17 18:22:31 +01:00
```
2023-03-11 14:42:01 +01:00
{% endcode %}
2017-09-27 03:14:53 +10: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 14:42:01 +01:00
{% code title="dnsconfig.js" %}
2023-01-20 13:56:20 +01:00
```javascript
2023-05-21 19:31:35 +02:00
var REG_NONE = NewRegistrar("none");
var DSP_SOFTLAYER = NewDnsProvider("softlayer");
2023-06-17 14:58:17 +02:00
D("example.com", REG_NONE, DnsProvider(SOFTLAYER),
2018-09-04 07:57:11 -07:00
NAMESERVER_TTL(86400),
2017-09-27 03:14:53 +10:00
2022-05-08 14:41:33 -04:00
A("test", "1.2.3.4")
2017-09-27 03:14:53 +10:00
);
2022-02-17 18:22:31 +01:00
```
2023-03-11 14:42:01 +01:00
{% endcode %}