-
Notifications
You must be signed in to change notification settings - Fork 545
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
Add token name provider argument #594
Conversation
This will no longer work with #561 |
Hi @tstoermer ! Thanks for this PR! Happy to look at it when it's ready for review. Per CONTRIBUTING.md it still needs test coverage. Also, the linked PR will likely move forward because it simply provides the option of not using a child token. I haven't checked out this code yet, but if there's some way to ensure this code works with that PR, that would be awesome. |
Hi @tyrannosaurus-becks, thanks for your first feedback. Please correct me, if I overlook anything - I was thinking about the two PRs. The linked PR will skip the child token creation for all tokens that are orphan tokens, e.g.:
This will limit the usage of token name for the vault provider child token. I would propose to change the other PR using a provider argument flag controlling the creation of a child token (default: create child token for backward compatibility). This would:
Another thing to consider: |
Hi @tyrannosaurus-becks, Local results:
Regarding the other failed tests in circleci build: |
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.
Thanks for pointing out the tests were broken on master! I merged a fix. This code looks really good. Just a couple minor things and then when the tests are passing, happy to merge it in.
Also, FWIW, I merged in master and pushed it up to a separate branch to see if the tests would pass, and they do presently: https://github.com/terraform-providers/terraform-provider-vault/compare/tstoermer-token-name.
Thanks @tyrannosaurus-becks, I added your suggestions and performed a merge with current master, to make sure everything is ok. |
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 fantastic! Thank you so much for doing this!
Add token name provider argument
Community Note
Introduce a provider argument to define the Vault child token name used by Terraform. This is useful to provide a reference of the Terraform run traceable in Vault audit log, e.g. commit hash or id of the CI/CD execution job.
Release note for CHANGELOG:
Output from acceptance testing:
N/A