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.sh
to hooks (see examples) - set
CHALLENGETYPE=dns-01
andHOOK_CHAIN=yes
to either the main, or a domain-specific configuration - consul-specific:
- export
CONSUL_HTTP_TOKEN
, and, optionallyCONSUL_HTTP_ADDR
variables in dehydration`s config (see variable settings above). Don't forget to export these variables. - set
pdns/api_key
andpdns/api_ip
in the consul kv store
- export
- static setting:
- export
API_URL
andAPI_KEY
variables 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