Skip to content
SHC Docs

shc connection zones

change which DNS zones a connection owns, keeping its credentials

Change the DNS zones a connection owns without re-entering its credentials. The connection keeps its stored credentials and every other provider it lights up (proxy, volume, ca-signer); only its zone set changes. --purpose public|private sets the declared purpose without changing zones or re-entering credentials.

--zone adds a zone. A trailing ! removes that zone. A bare ! alone leaves the connection with no DNS zones; named beside other --zone values, those zones are the whole set.

An added public zone is confirmed against the stored credentials and refused if the provider cannot see it. A removal never contacts the provider. A removed zone stops matching hosts, so records for those names stop being written through this connection; records it already published stay where they are. On a connection declared --purpose private, auto-zone mints a zone back when a host under it next asks for a private record.

A public zone auto-zone mirrored into a private connection is not one of its declared zones. The private connection serves it while a public connection owns that zone and drops it when none does; this command neither adds nor removes a mirror.

shc connection zones <name> [flags]
shc connection zones hcloud -t master --zone example.com!,example.net!
shc connection zones cloudflare -t corp --zone example.org
shc connection zones hcloud -t master --zone '!'
-h, --help help for zones
--purpose string DNS zone purpose: public | private; keeps the stored purpose when omitted
-t, --tenant string owning tenant (defaults to the active tenant)
--zone strings zone to add; <zone>! removes it; ! alone clears, and beside other zones is the whole set (repeatable, comma-separated)
--config stringArray extra YAML config file to layer on top of auto-discovered config; repeatable, later files win
-d, --debug enable debug mode (default: $SHC_DEBUG)
-e, --environment string environment name (default: "prod", or "default" on an estate with no licence and no trial; $SHC_ENVIRONMENT and shc ctx -e override it, and the "master" tenant is always "default")
--exclude string comma-separated dotted paths to drop
--fields string comma-separated columns/keys to show (and their order)
--filter string comma-separated dotted paths to keep (drops everything else)
-o, --output string output format: tty|text|json|yaml (default: $SHC_OUTPUT)
-s, --stack string stack name (default: $SHC_STACK)
-v, --verbose verbose output (default: $SHC_VERBOSE)