Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow CNAME creates #16

Closed
rebstar6 opened this issue Oct 5, 2018 · 0 comments · Fixed by #20
Closed

Allow CNAME creates #16

rebstar6 opened this issue Oct 5, 2018 · 0 comments · Fixed by #20
Labels
good first issue Good for newcomers hacktoberfest Hacktoberfest good first issues kind/bug Something isn't working

Comments

@rebstar6
Copy link

rebstar6 commented Oct 5, 2018

The following command should work to create a CNAME (if that zone id existed):
vinyldns record-set-create --zone-id d825a806-49ee-4c97-b010-daaed19b92c3 --record-set-name some-cname --record-set-type CNAME --record-set-ttl 123 --record-set-data test.com

Right now, I get the following response:

Request URL:
<omitted>
Request Method:
POST
Request body:
{"zoneId":"d825a806-49ee-4c97-b010-daaed19b92c3","name":"testingCLIcname","type":"CNAME","ttl":123,"account":"","records":[{"address":"test.com"}]}
Response code: 
400
Response body:
{"errors":["Missing CNAME.cname"]}```

This should be a small fix. per https://www.vinyldns.io/api/recordset-model#record-data, the record data for a CNAME is cname, but it looks as though the CLI is sending address, which is the data for an A or AAAA. Should just need to update https://github.com/vinyldns/vinyldns-cli/blob/master/vinyldns.go#L659 to not hardcode Address as that field name.

@rebstar6 rebstar6 added kind/bug Something isn't working good first issue Good for newcomers hacktoberfest Hacktoberfest good first issues labels Oct 5, 2018
u5surf added a commit to u5surf/vinyldns-cli that referenced this issue Oct 6, 2018
@mdb mdb closed this as completed in #20 Oct 8, 2018
mdb added a commit that referenced this issue Oct 8, 2018
enable to use both of cname and address in record-set-create #16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest Hacktoberfest good first issues kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant