Skip to content

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

Closed

Conversation

readevalprint
Copy link

No description provided.

@wk8
Copy link
Owner

wk8 commented Jun 24, 2014

@readevalprint : thanks, but I don't get what you're trying to do, nor what issue you're trying to address.
Could you please provide a little more context & explanations?

@@ -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|
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't understand.

Copy link
Author

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?

@readevalprint
Copy link
Author

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?

@wk8
Copy link
Owner

wk8 commented Jun 24, 2014

@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.
But okay, why not. How about a resource attribute exclusive that would default to true, but that you could set to false in your case?

@wk8
Copy link
Owner

wk8 commented Jul 9, 2014

@readevalprint sorry didn't have time to work on that lately. Will try & make some time tomorrow.

@wk8
Copy link
Owner

wk8 commented Jul 9, 2014

@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.

@wk8 wk8 closed this Jul 9, 2014
@readevalprint
Copy link
Author

That works perfect, thanks a ton for your time and effort on this. @wk8

@readevalprint readevalprint deleted the feature/multiple_A_records branch July 9, 2014 19:26
@wk8
Copy link
Owner

wk8 commented Jul 9, 2014

@readevalprint : you're most welcome, glad that it does the job for you! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants