Skip to content

Commit d70046a

Browse files
committed
flarectl: Allow setting DNS record name with update
The `dns update` command didn't allow changing the record name. This change adds this functionality.
1 parent c070583 commit d70046a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/flarectl/flarectl.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ func dnsUpdate(c *cli.Context) {
406406
}
407407
zone := c.String("zone")
408408
recordID := c.String("id")
409+
name := c.String("name")
409410
content := c.String("content")
410411
ttl := c.Int("ttl")
411412
proxy := c.Bool("proxy")
@@ -418,6 +419,7 @@ func dnsUpdate(c *cli.Context) {
418419

419420
record := cloudflare.DNSRecord{
420421
ID: recordID,
422+
Name: name,
421423
Content: content,
422424
TTL: ttl,
423425
Proxied: proxy,
@@ -718,6 +720,10 @@ func main() {
718720
Name: "id",
719721
Usage: "record id",
720722
},
723+
cli.StringFlag{
724+
Name: "name",
725+
Usage: "record name",
726+
},
721727
cli.StringFlag{
722728
Name: "content",
723729
Usage: "record content",

0 commit comments

Comments
 (0)