-
Notifications
You must be signed in to change notification settings - Fork 12
Create exclusive action for domains and create action no longer removes #3
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
Create exclusive action for domains and create action no longer removes #3
Conversation
Create exclusive action for domains and create action no longer removes
@readevalprint : thanks, but I don't get what you're trying to do, nor what issue you're trying to address. |
@@ -16,8 +16,13 @@ class CloudflareClient < CloudFlare::Connection | |||
# @param zone [String] | |||
# @param name [String] | |||
def rec_delete_by_name zone, name | |||
get_all_records_for_zone(zone).each do |rec| |
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.
Don't understand.
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.
get_record
only returns the first A record of a given zone and name. But if there are multiple entries, we should remove them all. Does this make sense?
Yes, this was a bit premature to make a PR. The goal is to be able add A records without removing existing ones so we can have round robin DNS with load balancers. But also to have "exclusive" domain names for direct access. Does that make sense? |
@readevalprint correct me if I'm wrong : you want to have several A records with the same name with different IPs. That's indeed the use case I had in mind at all when I wrote this, mostly because well DNS failover with multiple A records is pretty bad IMHO. |
@readevalprint sorry didn't have time to work on that lately. Will try & make some time tomorrow. |
@readevalprint : this has been taken care of in v0.1.6 (#5) Please see examples at https://github.com/wk8/cookbook-cloudflare/blob/0.1.6/recipes/example.rb#L19-L41 that show how to have multiple A records with the same name. Please let me know how that works for you! Closing this PR. |
That works perfect, thanks a ton for your time and effort on this. @wk8 |
@readevalprint : you're most welcome, glad that it does the job for you! :-) |
No description provided.