cloudflare-go icon indicating copy to clipboard operation
cloudflare-go copied to clipboard

Can we create a zone from the CLI ?

Open pascalandy opened this issue 9 years ago • 6 comments

Per example

docker run -it --rm --env-file $HOME/.cloudflare/env solidnerd/cloudflare \
dns create --zone hillmama.com --name hillmama.com --proxy --type A --content 111.222.333.233

pascalandy avatar May 02 '17 17:05 pascalandy

The included flarectl CLI client provides a "zone" sub-command that can create zones.

On Tue, May 2, 2017 at 10:37 AM Pascal Andy [email protected] wrote:

Per example

docker run -it --rm --env-file $HOME/.cloudflare/env solidnerd/cloudflare dns create --zone hillmama.com --name hillmama.com --proxy --type A --content 111.222.333.233

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cloudflare/cloudflare-go/issues/119, or mute the thread https://github.com/notifications/unsubscribe-auth/AABIcG8dYZsvPNI6i--CfA_2uM2m7d10ks5r12m6gaJpZM4NOdA8 .

elithrar avatar May 03 '17 02:05 elithrar

@pascalandy does @elithrar's response help you?

jamesog avatar May 04 '17 19:05 jamesog

I have to say no.

I would appreciate an example. IMHO this should work:

docker run -it --rm --env-file $HOME/.cloudflare/env solidnerd/cloudflare \
dns create --zone hillmama.com --name hillmama.com --proxy --type A --content 111.222.333.233

but it does not. What is the syntax then ?

pascalandy avatar May 04 '17 21:05 pascalandy

There is help built in:

$ ./flarectl --help
NAME:
   flarectl - Cloudflare CLI

USAGE:
   flarectl [global options] command [command options] [arguments...]

VERSION:
   2016.4.0

COMMANDS:
   ips, i	Print Cloudflare IP ranges
   user, u	User information
   zone, z	Zone information
   dns, d	DNS records
   pagerules, p	Page Rules
   railgun, r	Railgun information
   help, h	Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h		show help
   --version, -v	print the version

You want the zone sub-command, not dns.

$ ./flarectl zone --help
NAME:
   flarectl zone - Zone information

USAGE:
   flarectl zone command [command options] [arguments...]

COMMANDS:
   list, l	List all zones on an account
   create, c	Create a new zone
   check	Initiate a zone activation check
   info, i	Information on one zone
   plan, p	Plan information for one zone
   settings, s	Settings for one zone
   dns, d	DNS records for a zone
   railgun, r	Railguns for a zone
   certs, c	Custom SSL certificates for a zone
   keyless, k	Keyless SSL for a zone
   help, h	Shows a list of commands or help for one command

OPTIONS:
   --help, -h	show help

jamesog avatar May 04 '17 21:05 jamesog

Of course!! Thank you :)

pascalandy avatar May 04 '17 21:05 pascalandy

While there is help built in, nowhere does it say which arguments to use for zone settings command.

vrocks avatar Mar 16 '18 08:03 vrocks