Backport of Feature: add filebase64 function into release/1.3.x #13248
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #11791 to be assessed for backporting due to the inclusion of the label backport/1.3.x.
The below text is copied from the body of the original PR.
Signed-off-by: Conor Evans coevans@tcd.ie
Closes #11522
As noted in that issue, Terraform implements this function. About a month ago, the
MakeFileFunc
in Terraform deviated from hashicorp/go-cty-funcs which Nomad is using and which this PR continues to use. If the code change in Terraform is relevant here, perhaps it should be copied over tohashicorp/go-cty-funcs
, but I'll leave that in your hands.I copied the Doc largely from Terraform, removing some of the content that was Terraform-focused. If it needs to be updated, let me know or make the changes yourself as you see fit. Docs are pretty tricky to get right and you maintainers will know much better than me how you'd like to phrase it.
I didn't add a test here, mostly because there is no existing
functions_test
file with a Test Table I could easily plug in to, and the Terraform test didn't transfer over. Unfortunately there's also no test inhashicorp/go-cty-funcs
. If you want to add one, please do so as you see fit.