Dehydration hook for DNS-01 challenge using PowerDNS API
The script runs only if challenge type is set to dns-01. It handles two
commands: deploy_challenge, and clean_challenge.
Both commands work similarly: they both receive all parameters at once,
search their domains in PowerDNS API, and sets (deploy_challenge) / removes
(clean_challenge) TXT records in zones managed by the server.
- add
dns01.shto hooks (see examples) - set
CHALLENGETYPE=dns-01andHOOK_CHAIN=yesto either the main, or a domain-specific configuration - consul-specific:
- export
CONSUL_HTTP_TOKEN, and, optionallyCONSUL_HTTP_ADDRvariables in dehydration`s config (see variable settings above). Don't forget to export these variables. - set
pdns/api_keyandpdns/api_ipin the consul kv store
- export
- static setting:
- export
API_URLandAPI_KEYvariables in dehydration's config (see variable settings above). Don't forget to export these variables.
- export
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request