wallix / awless

A Mighty CLI for AWS
http://awless.io/
Apache License 2.0
4.98k stars 263 forks source link

Unable to create Route53 PTR record - error parsing template #133

Closed mtimchenko-fz closed 7 years ago

mtimchenko-fz commented 7 years ago

Hi !

I'm trying to create a PTR record in Route53 using lastly avaialble awless version=v0.1.2 :

awless -p MYPROFILE -r MYREGION create record name="10.10.10.10.in-addr.arpa." ttl=300 type=PTR value=host01.test.domain.cxm zone=MYZONE

and receiving :

[error] error parsing template at line 1 (char 45): -> create record name=10.10.10.10.in-addr.arpa.

What could be wrong ?

thanks

simcap commented 7 years ago

@mtimchenko-fz Thanks.

Indeed this would be due to our PEG parsing that detects an IP form (starting with 10.0.0.0) and then bails out as it cannot parse it correctly.

We will fix that (and probably remove type parsing from the PEG)

In the meantime to execute it from your console put the entire value of your record's name in double quote and backslash them (necessary for bash correct interpretation) like so awless create record name=\"10.10.10.10.in-addr.arpa.\" ttl=300 ...

I tested it and it will work.

mtimchenko-fz commented 7 years ago

Thank you.

I confirm - it works with backslashed + double quotes.