-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add support for max_page_size in the vault_ldap_auth_backend #1878
Add support for max_page_size in the vault_ldap_auth_backend #1878
Conversation
Tests fail on |
@laugmanuel , @vinay-gopalan , @raymonstah please take a look, if anything needs changing please let me know. |
@@ -67,6 +67,11 @@ func ldapAuthBackendResource() *schema.Resource { | |||
Optional: true, | |||
Computed: true, | |||
}, | |||
"max_page_size": { | |||
Type: schema.TypeInt, | |||
Default: -1, |
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.
If the Vault API returns a default for this field then we should not set a Default in the provider. We can instead set this field to Computed: true
.
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.
The issue is that currently Vault API returns the wrong value (0) instead of (-1), which breaks most LDAP implementations, as it causes no results to be sent. They have their own PR with a fix being made, but this change makes it backwards compatible.
https://developer.hashicorp.com/vault/api-docs/auth/ldap#max_page_size
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.
ok, thanks for the explanation. I think in this case we can set the Default then.
@benashz Hi, would it be possible to merge this? |
Community Note
Relates OR Closes #1862
Release note for CHANGELOG:
Output from acceptance testing: