barnybug / cli53

Command line tool for Amazon Route 53

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check if zone Name already exists

surrealchemist opened this issue · comments

Issue type

  • Feature idea

cli53 version (cli53 --version)

cli53 version 0.8.10

I would find it helpful to have an option for cli53 to just exit if a zone already exists with the same name. It would make it easy to re-run a command to ensure the domain is there without having to have some other logic to manually check.

Sticking to the unix philosophy, I would use cli53 list and grep. Not sure this warrants a whole new command.

I was thinking more of just a flag to the create command so it skips creating if it exists.

Ended up doing something like this:

if ! cli53 export $domain > /dev/null 2>&1 ; then
    cli53 create $domain
fi