-
Notifications
You must be signed in to change notification settings - Fork 118
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 new resource random_bytes
to generate an array of random bytes
#272
Conversation
@bendbennett Hello, is there any chance to see this PR merge (or if it's not something you want, rejected) soon ? I need this I would like to know if at least it's something you are considering or if I should instead create my own provider ? |
@bendbennett Have you any ETA ? I really need this and I'm just going to move it to my own provider and close this if it's not going to be merged soon |
@Socolin apologies for delay in responding on this. I'm afraid that I don't have an ETA at this time but I will endeavour to get some feedback to you. |
I'm also waiting badly for this PR to get merged. Have a comment in my code base pointing here 😄 |
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 the contribution.
Could you rebase on main
?
Looks like this PR is using v0.9.0
of terraform-plugin-framework
.
45f5132
to
0578ee9
Compare
I updated the code, can you please merge this soon ? |
nice - this PR is exactly what i currently miss in the random provider. |
I'd be willing to help out if it means getting this merged sooner. A huge need for us, thanks! |
@bendbennett Do you have an ETA on this ? |
We hope to release this in the next few weeks, it's queued behind some other work that we have planned. |
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.
@Socolin thank you for your contribution.
Would you be happy to add a couple more tests to verify:
- Behaviour of validator on
length
attribute is as expected. - Altering
length
forces a replacement.
internal/provider/resource_bytes.go
Outdated
Sensitive: true, | ||
}, | ||
"id": { | ||
Description: "The generated bytes presented in string format.", |
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.
at a cursory glance I don't think this is accurate, "id" appears to always be set to "none". Other providers have this described as "A static value used internally by Terraform, this should not be referenced in configurations."
Should result
be added to actually return the generated bytes in string format? probably a question for @bendbennett - not sure how the state file is expected to behave with binary data in it - or whether it could be achieved in the Read
function - or if anyone would ever use it anyway
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 did not set result
to avoid confusion, since the result is always encoded. But I could add it, we just need to choose if the default is base64 or hex (or other ?)
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.
As the base64 and hex encodings of result
are available it doesn't seem like there is a need for result
as @Socolin indicates it would need to be encoded.
0578ee9
to
0839bdf
Compare
Thanks for the comments, I pushed a fix for them. |
Think everything I left looks good, although maybe I obscured a request from Ben for two more tests to be added :) |
Thanks I forgot about this, I'm checking this |
0f82f05
to
a0911a7
Compare
…uiresReplaceIfValuesNotNull
…erChange that was not failing when it should be
I rebased the branch on |
Hello, |
Any update or timeline on when this might go in would really be appreciated. Waiting for this as others. Thank you. |
Hello, @bendbennett What is the next steps for this to be merged and released ? |
Hi @Socolin 👋 I'd like to get an additional approval of the PR prior to merging as these changes are a significant alteration to the random utility provider. The efforts of the team are currently focussed elsewhere at the moment but we will endeavour to focus some attention on this as soon as we're able. |
Hi @bendbennett, another interested party here. I'd really appreciate to have this in the random provider. We are currently generating tokens for akamai CDN which require hex strings, and the only option I saw is to use the random_id resource, but that's a really insecure option since output is not sensitive :( Hope you get soon a second approval for this PR. Cheers! |
@bendbennett Hello, do you have any ETA or "Not before" date for this ? |
Hi @Socolin and @GerardSoleCa 👋 Apologies for the delay. The focus of the team is currently elsewhere at the moment so it's hard to give an ETA. |
To anyone looking for this, I published this in a separate provider https://registry.terraform.io/providers/Socolin/randombyte/latest resource "randombyte_bytes" "name" { |
Hi @Socolin 👋 Apologies for the delay in getting back to you. We have recently discussed your PR, and, if you're still amenable, we would like to move forward with the addition of the The following suggestions came out of our discussion:
Thank you again for your contribution, and sorry it has taken a while for us to get back to you. |
Hi @Socolin 👋 I've incoporated all of your commits into Add random_bytes resource. If you'd rather update this PR with the suggestions in this comment, then that would be great. If not, then we'll move forward with Add random_bytes resource. Many thanks for all your work on this, and apologies for the delay. |
Hello, I'm working on other project right now, you can move forward with your PR, Thanks :) |
<Actions> <action id="296d75eab55b9d23bd1e94dc34cea43b964c29945c12fefcb674e3c068a0a767"> <h3>Bump Terraform `random` provider version</h3> <details id="1d9343c012f5434ac9fe8a98135bae3667b399259be16d9b14302ea3bd424a24"> <summary>Update Terraform lock file</summary> <p>"hashicorp/random" updated from "3.5.1" to "3.6.0" in file ".terraform.lock.hcl"</p> <details> <summary>3.6.0</summary> <pre>Changelog retrieved from:
	https://github.com/hashicorp/terraform-provider-random/releases/tag/v3.6.0
FEATURES:

* resource/random_bytes: New resource that generates an array of random bytes intended to be used as key or secret ([#272](https://github.com/hashicorp/terraform-provider-random/issues/272))


</pre> </details> </details> <a href="https://infra.ci.jenkins.io/job/terraform-jobs/job/azure/job/main/918/">Jenkins pipeline link</a> </action> </Actions> --- <table> <tr> <td width="77"> <img src="https://www.updatecli.io/images/updatecli.png" alt="Updatecli logo" width="50" height="50"> </td> <td> <p> Created automatically by <a href="https://www.updatecli.io/">Updatecli</a> </p> <details><summary>Options:</summary> <br /> <p>Most of Updatecli configuration is done via <a href="https://www.updatecli.io/docs/prologue/quick-start/">its manifest(s)</a>.</p> <ul> <li>If you close this pull request, Updatecli will automatically reopen it, the next time it runs.</li> <li>If you close this pull request and delete the base branch, Updatecli will automatically recreate it, erasing all previous commits made.</li> </ul> <p> Feel free to report any issues at <a href="https://github.com/updatecli/updatecli/issues">github.com/updatecli/updatecli</a>.<br /> If you find this tool useful, do not hesitate to star <a href="https://github.com/updatecli/updatecli/stargazers">our GitHub repository</a> as a sign of appreciation, and/or to tell us directly on our <a href="https://matrix.to/#/#Updatecli_community:gitter.im">chat</a>! </p> </details> </td> </tr> </table> Co-authored-by: Jenkins Infra Bot (updatecli) <[email protected]> Co-authored-by: Damien Duportal <[email protected]>
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Intended to be used as key or secret
Fix #63