-
Notifications
You must be signed in to change notification settings - Fork 597
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
Fix CreateOrUpdate needs the record name #1341
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
dns: allow for create or update to actually create the record | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,12 +114,15 @@ func dnsCreateOrUpdate(c *cli.Context) error { | |
} | ||
} else { | ||
// Record doesn't exist - create it | ||
rr := cloudflare.CreateDNSRecordParams{} | ||
rr.Type = rtype | ||
rr.Content = content | ||
rr.TTL = ttl | ||
rr.Proxied = &proxy | ||
rr.Priority = &priority | ||
rr := cloudflare.CreateDNSRecordParams{ | ||
Name: name, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed the initialisation to make it match the |
||
Type: rtype, | ||
Content: content, | ||
TTL: ttl, | ||
Proxied: &proxy, | ||
Priority: &priority, | ||
} | ||
|
||
// TODO: Print the response. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this |
||
result, err = api.CreateDNSRecord(context.Background(), cloudflare.ZoneIdentifier(zoneID), rr) | ||
if err != nil { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.