-
Notifications
You must be signed in to change notification settings - Fork 5
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
please consider ignore case difference when apply #71
Comments
@fsdrw08 Thank you for helping to improve the provider. |
Please describe the terraform flow to produce this situation. |
I use opendj, you can run it via docker, opendj:
image: openidentityplatform/opendj:latest
hostname: opendj.example.com
ports:
- "1389:1389"
- "1636:1636"
- "4444:4444"
volumes:
- ./opendj/bootstrap/data/:/opt/opendj/bootstrap/data #initial data
- ./persistence/opendj:/opt/opendj/data #opendj data
environment:
- BASE_DN=dc=openidentityplatform,dc=org #should be yours base DN the ldif of initial data in my case
after docker-compose up, run the terraform to apply ldap entry # This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/l-with/ldap" {
version = "0.5.6"
constraints = ">= 0.5.6"
hashes = [
"h1:cqTRL6dknCj0b6yLFX+4ZNFFMnuqbpJ0PcAaE6smQ0k=",
]
}
provider config: provider "ldap" {
...
bind_user = "cn=Directory Manager"
bind_password = "password"
} terraform code resource "ldap_entry" "user_admin" {
dn = "uid=admin,ou=People,dc=openidentityplatform,dc=org"
data_json = jsonencode({
objectclass = ["top", "inetOrgPerson", "organizationalPerson", "person"]
userPassword = ["{SSHA}9tYIWTF0A7+ipgncHEJJhRL9Vb/pydxL4A=="]
cn = ["admin"]
sn = ["admin"]
})
} after applied, re-apply or run
|
Thank you for the detailed information. I can repoduce this. Refering to the discussion on this issue 129 for the go ldap library it seems to be possible that there are LDAP server implementations that allow to define schemes with case sensitive attribute names. Thus I would prefer to implement this optional, for instance with a possible exeception definition by an attribute "case_sensitive_attributes". There are two import aspects:
It's not such a big effort to name the attributes in the Terraform code according to the schema definition case sensitive, is'nt it? |
yes, I think it is not a big problem, but maybe we should add some note message in the provider document to remind the case sensitive issue |
release 0.7.0 has two new features to solve this |
currently there is different terraform plan result when the attribute case from tf resource different from the ldap server, e.g. when config attribute name
objectclass
, and run terraform plan, it will causefor now, I had to make every attribute case match with the ldap server,e.g.
objectclass
->objectClass
.The text was updated successfully, but these errors were encountered: