Skip to content

INWX: support init command#4293

Open
TomOnTime wants to merge 4 commits into
mainfrom
inwx-register-creds-metadata
Open

INWX: support init command#4293
TomOnTime wants to merge 4 commits into
mainfrom
inwx-register-creds-metadata

Conversation

@TomOnTime

Copy link
Copy Markdown
Collaborator

Summary

Register CredsMetadata for INWX so the provider is offered by the dnscontrol init wizard.

Fields mirror the entries in integrationTest/profiles.json.

CC: @patschi

Test plan

  • go build ./... passes
  • dnscontrol init lists INWX as an option
  • Verify any // TODO: Verify annotations in the diff (e.g. PortalURL)

🤖 Generated with Claude Code

Register CredsMetadata so the INWX provider appears in the `dnscontrol init` wizard.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@patschi

patschi commented May 19, 2026

Copy link
Copy Markdown
Contributor

It's been a busy week - sorry. Would be weekend fine for you?

@TomOnTime

Copy link
Copy Markdown
Collaborator Author

Sure! No rush!

Comment thread providers/inwx/inwxProvider.go Outdated
@TomOnTime

Copy link
Copy Markdown
Collaborator Author

Friendly ping?

@patschi

patschi commented Jun 7, 2026

Copy link
Copy Markdown
Contributor
  • go build ./... passes

Build works:

$ go build -o /tmp ./... ; echo $?
0
$ ls /tmp/dnscontrol ; file /tmp/dnscontrol
/tmp/dnscontrol
/tmp/dnscontrol: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=CThsDipYvdt-bCG7Esu-/zUSjpt0mb-lCNIxjtE0Y/xR_hFqLv-M4xzDcNIdhn/b1RvfrW72nwUo0eDG0lN, BuildID[sha1]=809c7cdadceaf71e231e8cdccdf4ab02b788f225, with debug_info, not stripped
$ /tmp/dnscontrol version
v4.39.1-0.20260527131848-aad568c254b9
  • dnscontrol init lists INWX as an option

What I found a bit misleading is the sandbox question:

API settings for INWX: https://www.inwx.com/en/customer
? Username (required) <username>
? Password (required) [? for help] ****************************************************************
? Set to 1 to use the INWX sandbox API (ote.inwx.com) instead of production. Leave blank for production.
? Use sandbox (optional) [sandbox] (optional)

Only when using ? it presents the help text of Set to 1 to use..., which feels a bit confusing though.

Beside this, the entire init process worked just fine (including the final preview):

$ /tmp/dnscontrol init
Welcome to dnscontrol init.
This wizard creates a creds.json and a starter dnsconfig.js.

A DNS provider hosts the records (A, MX, TXT, CNAME, and so on) for your zones.
Pick NONE if you want to defer this choice.
Providers not listed below can be configured from their documentation page at https://docs.dnscontrol.org/provider/.
? Which DNS service provider do you want to configure? INWX
? Use the same INWX account for the registrar role too? Yes

== DNS provider: INWX ==

Each entry in creds.json stores a set of credentials (usually an API key,
token, or PAT) and other information required to authenticate API calls.
The entry name ("credkey") identifies this set of credentials, for example "inwx_primary".
? creds.json entry name for this provider inwx_primary

API settings for INWX: https://www.inwx.com/en/customer
? Username (required) <username>
? Password (required) [? for help] **...**
? Use sandbox (optional) [sandbox] (optional)

Verifying credentials for INWX...
Credentials OK. Found 23 zone(s) at INWX.

? Select from the 23 zone(s) found at INWX? Yes
? Select zones to manage in dnsconfig.js example.com
? Add another domain manually? No

Fetching records for 1 zone(s) from INWX...
Imported records for 1 zone(s).

--- creds.json ---
{
  "inwx_primary": {
    "TYPE": "INWX",
    "password": "<password>",
    "username": "<username>"
  }
}

--- dnsconfig.js ---
/*
   dnsconfig.js: dnscontrol configuration generated by `dnscontrol init`.
*/

// Providers:

var REG_INWX = NewRegistrar("inwx_primary");
var DNS_INWX = NewDnsProvider("inwx_primary");

// Domains:

D("example.com", REG_INWX, DnsProvider(DNS_INWX),
    DefaultTTL(43200),
[...]


? Write these files? Yes

Done.

Comparing domains in dnsconfig.js with zones at INWX...

$ /tmp/dnscontrol get-zones --format=nameonly -- inwx_primary - all

Zones at INWX compared with dnsconfig.js:
  In both          : example.com
  Only in config   : (none)
  Only at provider : [...]
? Run `dnscontrol preview` now? (Y/n)
? Run `dnscontrol preview` now? Yes

$ /tmp/dnscontrol preview
2026/06/07 17:32:14 1 Validation errors:
2026/06/07 17:32:14 WARNING: inconsistent TTLs at "example.com": A:43200 CAA:43200 MX:3600 TXT:3600,43200
CONCURRENTLY checking for 1 zone(s)
SERIALLY checking for 0 zone(s)
Waiting for concurrent checking(s) to complete...DONE
CONCURRENTLY gathering records of 1 zone(s)
SERIALLY gathering records of 0 zone(s)
Waiting for concurrent gathering(s) to complete...DONE
******************** Domain: example.com
2 corrections (inwx_primary)
#1: ± MODIFY-TTL example.com NS ttl=(86400->300) ns1.example.com.
#2: ± MODIFY-TTL example.com NS ttl=(86400->300) ns2.example2.com.
Done. 2 corrections.

================================================================================

Welcome to the DNSControl community!

Questions, feedback or ideas are always welcome:
  Discussions: https://github.com/StackExchange/dnscontrol/discussions
  Issues:      https://github.com/StackExchange/dnscontrol/issues

Learn more:
  Getting started: https://docs.dnscontrol.org/getting-started/getting-started
  Examples:        https://docs.dnscontrol.org/getting-started/examples
  Migrating zones: https://docs.dnscontrol.org/getting-started/migrating

Want to stay up to date? Releases and the monthly DNSControl community video call
are announced at https://github.com/StackExchange/dnscontrol/discussions/categories/announcements
  • Verify any // TODO: Verify annotations in the diff (e.g. PortalURL)

The links in the code are correct and work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants