-
Notifications
You must be signed in to change notification settings - Fork 22
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
Adds a 'vultr_reverse_name' resource #78
Conversation
It works for IPv4 and IPv6 likewise. An extra resource has been chosen, because in order to set the reverse name, the IP(s) of the instance have to be known. And that's only after they have been created. When an IPv4 reverse name is deleted, nothing really happens. This is because there is not API of Vultr to 'reset' the reverse name.
@cimnine thank you for making the PR! I made a few notes for small changes and I have one question about the |
Thank you for your feedback! I've implemented all your suggestions and added some additional validation. Because adding additional validation required two external dependencies, and glide updates all dependencies when adding new ones, this PR suddenly got huge :-/ Maybe it's time to move on and |
Hmm I don’t believe that adding the validation dependency really needs 9,000,000 new lines of code, not diff’d lines but added lines. Can you please try |
Command used: ```bash glide get \ --quick \ -v \ "golang.org/x/net/idna" \ "github.com/hashicorp/terraform/helper/validation" ```
Even if it's technically speaking not required, this resource doesn't make sense if isnt'.
For querying existing reverse names without declaring them through terraform.
Unfortunately I've found it impossible to pass the build and have less code changes in vendor. (Or I just don't get how.) Still, by excluding nested glide get -v "golang.org/x/net/idna" "github.com/hashicorp/terraform/helper/validation"
# tried, but doesn't work on travis:
glide get --quick -v "golang.org/x/net/idna" "github.com/hashicorp/terraform/helper/validation" I've used the command above. Maybe you could give it a try? We could argue if it's really necessary to add these dependencies. The IP checker isn't, that's trivial to implement. But the conversion between IDN and ASCII domain name representations is not easy to implement. And I believe that conversion is necessary in order to reliably compare whether domain names have changed. |
I’ll take a look at the vendoring commit |
As you might have seen I've went ahead (maybe too far?) and presented a way that creates less changes to the code base by migrating over to the Feel free to close these PRs anytime should you not be comfortable with the way I was approaching things. ~Chris |
This PR implements a new resource for setting reverse dns entries.
An extra resource has been chosen, because in order to set the reverse name, the IP(s) of the instance have to be known. And that's only the case after the instance has been created.
The syntax is like this:
As you see, it works for IPv4 and IPv6 likewise. (Although internally they are handled by two different API endpoints. But the behavior as observed by the is very similar. That's why I've decided to combine the IPv4 and IPv6 case into one resource type.)
When destroying an IPv4 reverse name resource, nothing actually happens. That's because there is no API endpoint by Vultr to "restore the default name".
I think this resolves #34 and #56.