Skip to content

cdk-dnscontrol-cli Documentation

Overview

cdk-dnscontrol-cli is a CLI tool that allows you to synth, diff, and deploy DNS configurations written with CDK.

Installation

Build with Go:

go build -o cdk-dnscontrol-cli ./cdk-dnscontrol-cli

Subcommands

diff

Shows the difference between the DNS configuration generated by CDK synth and the current DNS state.

./cdk-dnscontrol-cli diff [--cdk-entry-point <path>] [--credentials-json <path>]
  • --cdk-entry-point, -i: CDK entry point (default: ./bin/index.ts)
  • --credentials-json, -c: Credentials file (default: ./creds.json)

deploy

Applies the DNS configuration generated by CDK synth.

./cdk-dnscontrol-cli deploy [--cdk-entry-point <path>] [--credentials-json <path>]
  • --cdk-entry-point, -i: CDK entry point (default: ./bin/index.ts)
  • --credentials-json, -c: Credentials file (default: ./creds.json)

migration

Helps migrate from an existing dnsconfig.js to CDK stacks.

./cdk-dnscontrol-cli migration [--dnsconfig <path>] [--outputDir <dir>]
  • --dnsconfig, -d: dnsconfig.js file (default: ./dnsconfig.js)
  • --outputDir, -o: Output directory (default: ./lib/stacks)

Examples

1
2
3
./cdk-dnscontrol-cli diff
./cdk-dnscontrol-cli deploy -i ./bin/myentry.ts -c ./mycreds.json
./cdk-dnscontrol-cli migration -d ./dnsconfig.js -o ./lib/stacks

Notes

  • Requires Node.js, tsx, npx, and other dependencies.
  • creds.json should contain your DNS provider credentials.