Creating TXT record fails
mtibben opened this issue · comments
Issue type
- Bug report
cli53 version (cli53 --version)
cli53 version master
(installed via brew install cli53)
OS / Platform
macOS catalina
Steps to reproduce
$ cli53 rrcreate example.org '@ 300 TXT "test"'
Error: InvalidChangeBatch: [Tried to create resource record set [name='example.org.', type='TXT'] but it already exists]
status code: 400, request id: xxxxxxxxxxxxxxxxxxxxxxxxxxx
Expected behaviour
I expected cli53 to create a TXT ResourceRecordSet in route53, likely needed to be merged with the existing TXT records
Actual behaviour
DEBUG: Request route53/ListHostedZonesByName Details:
---[ REQUEST POST-SIGN ]-----------------------------
GET /2013-04-01/hostedzonesbyname?dnsname=example.org HTTP/1.1
Host: route53.amazonaws.com
User-Agent: aws-sdk-go/1.13.34 (go1.13.3; darwin; amd64)
Authorization: xxxx
X-Amz-Date: 20191114T013706Z
X-Amz-Security-Token: xxxx
Accept-Encoding: gzip
-----------------------------------------------------
DEBUG: Response route53/ListHostedZonesByName Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: text/xml
Date: Thu, 14 Nov 2019 01:37:07 GMT
Vary: accept-encoding
X-Amzn-Requestid: xxxx
-----------------------------------------------------
DEBUG: Request route53/ChangeResourceRecordSets Details:
---[ REQUEST POST-SIGN ]-----------------------------
POST /2013-04-01/hostedzone/XXXXXXXXXX/rrset/ HTTP/1.1
Host: route53.amazonaws.com
User-Agent: aws-sdk-go/1.13.34 (go1.13.3; darwin; amd64)
Content-Length: 399
Authorization: xxxx
X-Amz-Date: 20191114T013707Z
X-Amz-Security-Token: xxxx
Accept-Encoding: gzip
-----------------------------------------------------
DEBUG: Response route53/ChangeResourceRecordSets Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 400 Bad Request
Connection: close
Content-Length: 344
Content-Type: text/xml
Date: Thu, 14 Nov 2019 01:37:07 GMT
X-Amzn-Actiontrace: xxxx
X-Amzn-Requestid: xxxx
-----------------------------------------------------
Error: InvalidChangeBatch: [Tried to create resource record set [name='example.org.', type='TXT'] but it already exists]
status code: 400, request id: xxxx
Have you checked if the documentation has the information you require?
Yes
Records with multiple values like TXT are still treated as a single record. So you need to merge and run rrcreate --replace
. See the docs for further examples https://github.com/barnybug/cli53/blob/master/README.md