Skip to content
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

Not possible to create the root object of a ldap tree #3

Open
kasimon opened this issue May 22, 2017 · 5 comments
Open

Not possible to create the root object of a ldap tree #3

kasimon opened this issue May 22, 2017 · 5 comments

Comments

@kasimon
Copy link

kasimon commented May 22, 2017

The fact that you have to specficy db and base_dn makes it impossible to address the root object of a ldap tree with this provider, because even if I leave base_dn empty, the stray comma will cause an syntax error. This prevents me from initializing a completely empty ldap tree with terraform. My proposal would be to don't add the concatation comma when it's empty.

Thinking more about it, for the purpose of this provider maybe it would be sensible to don't use base_dn at all. If you define the desired state of an ldap directory with terraform, there should be no ambiguity where an entry will be placed. And das far as I understand the code (my go is not very fluent), if the provider will create an item it will be located at $dn,$basedn whereas it will find an existing item $dn anywhere below $base_dn. In my opinion $dn should be the complete dn of an entry and the provider should look for the item only at exactly that position (that would be a ldap search with filter="objectClass=*", scope="one", basedn="$dn").

@dihedron
Copy link
Contributor

dihedron commented May 27, 2017

Hi @kasimon
please take a look at my pull request; I hope @Pryz will pull it otherwise you may still want to give a try to my fork.
Cheers!

@kasimon
Copy link
Author

kasimon commented May 29, 2017

Hi @dihedron,

I definitely will look at your fork as soon as I manage to free some time for it. Looks very good!

Pryz added a commit that referenced this issue May 31, 2017
Lots of enhancements and fix to issue #3
@Pryz
Copy link
Owner

Pryz commented May 31, 2017

I will close this issue as fixed since we merged #4 :)

@dihedron
Copy link
Contributor

dihedron commented Jun 3, 2017

Hi @kasimon , can you please provide a feedback? The latest pull request should have addresses your issue.
Thanks!

@kasimon
Copy link
Author

kasimon commented Jun 14, 2017

Hi @dihedron, sorry I was ill for two weeks. I will try to verify your change in the next days, if my work backlog allows it.

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

No branches or pull requests

3 participants