-
Notifications
You must be signed in to change notification settings - Fork 540
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
Allow setting HTTP headers #730
Allow setting HTTP headers #730
Conversation
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.
This looks great so far! Just a couple minor things needed.
Required: true, | ||
Description: "The header name", | ||
}, | ||
"value": { |
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.
Would it be possible to get test coverage of the name
and value
fields? It would be cool to see what the Terraform config looks like when they're populated.
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.
I copied the basic token name test, and just added a custom provider configuration which included a header. It doesn't test any header related functionality (which would depend on individual use cases), only that the headers don't cause errors when Vault is doing things (in the case of this test, token lookup)
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.
Thank you!
* allow the config of headers for vault client * add documentation * clone existing headers before adding * PR recommendations, add test
This PR adds the ability to set HTTP headers for Vault API requests made by the Terraform Vault provider. A sample configuration:
I have run the acceptance tests locally and also ran this against a Vault cluster in the cloud that requires specific headers in order for requests to forward to the cluster properly.
Community Note
Relates OR Closes #0000
Release note for CHANGELOG:
Output from acceptance testing: