fix: use correct name when running dns create-or-update#1944
Closed
OhMyMndy wants to merge 3 commits intocloudflare:masterfrom
Closed
fix: use correct name when running dns create-or-update#1944OhMyMndy wants to merge 3 commits intocloudflare:masterfrom
OhMyMndy wants to merge 3 commits intocloudflare:masterfrom
Conversation
|
changelog detected ✅ |
OhMyMndy
commented
May 5, 2024
| } | ||
|
|
||
| records, _, err := api.ListDNSRecords(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.ListDNSRecordsParams{Name: name + "." + zone}) | ||
| records, _, err := api.ListDNSRecords(context.Background(), cloudflare.ZoneIdentifier(zoneID), cloudflare.ListDNSRecordsParams{Name: name}) |
Author
There was a problem hiding this comment.
On line 117, the record itself is create with just Name: name, not zone appended to it
Contributor
|
thanks for the PR, however, i'm hesitant to merge this as i think the intended use here is to omit the zone name from your the CLI is in maintenance only mode so i don't want to change the functionality here but perhaps a better in between is to strip the zone name if it is supplied as part of |
Author
|
Omitting zone name from the name value works perfectly indeed! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When running
flarectl dns create-or-updatethe update fails because it usesname + '.' + zoneinstead of justnameDescription
Change the name which is used to fetch the DNS record when it needs to be updated
Has your change been tested?
Yes, tested this with my previously failing command
flarectl dns create-or-update --zone mydomain.com --name '*.mydomain.com' --content 127.0.0.1 --type AScreenshots (if appropriate):
Types of changes
What sort of change does your code introduce/modify?
Checklist:
and relies on stable APIs.