terraform
terraform copied to clipboard
lang/funcs: Add camelCase, kebab-case and snake_case functions
Codecov Report
Merging #27357 (33934ed) into master (c0e37a7) will increase coverage by
0.03%
. The diff coverage is100.00%
.
Impacted Files | Coverage Δ | |
---|---|---|
lang/funcs/string.go | 100.00% <100.00%> (ø) |
|
lang/functions.go | 96.35% <100.00%> (+0.08%) |
:arrow_up: |
terraform/evaluate.go | 52.89% <0.00%> (+0.41%) |
:arrow_up: |
terraform/node_resource_plan.go | 98.05% <0.00%> (+1.94%) |
:arrow_up: |
I would love this @teamterraform :)
This PR has been languishing for a long time now 😞
Could someone from @teamterraform please comment on whether or not this contribution will be accepted if the conflicts are resolved?
@teamterraform I am in urgent need of these functions. I was writing logic in my tf module when I saw this PR.
Please let us know when these changes will get merged? A lot of people are waiting for this feature.
I can work on whatever is left.
It has been almost a year for such a simple but very useful feature.
@teamterraform Can we please have a look at it. This will save hours of work for many of us. Thanks! :heart:
Bumping! Would be nice to have this in terraform :)
Bumping again! I'm new to TF and this would be great to have.
This wasn't released yet right? Could that be included to convert json keys during jsondecode, as a optional parameter?
This PR is in a holding pattern for now, please see this comment: https://github.com/hashicorp/terraform/issues/28855#issuecomment-856345294, specifically:
We're being pretty cautious about adding new functions that overlap with existing use-cases because Terraform has grown quite an unwieldy collection of builtins over the years, and so we've been considering various ways to allow for externally-defined functions (e.g. https://github.com/hashicorp/terraform/issues/2771) to avoid continuing to grow that set. However, that's not something we'll be working on in the very near future, due to our current focus being elsewhere, so we'll revisit this at a later time and post any updates in those other issues.
Just an FYI as to why this hasn't been reviewed. The conversation is active but there are no updates as to externally-defined functions. Once that has been designed, it will be easier to determine which of the existing requests for functions belong in core versus belong outside of core.
@teamterraform any update on this?
@Shrirang97 no updates at this time.
@crw @teamterraform 9 months on; what are your latest thoughts on this please?
@jonmcewen https://github.com/hashicorp/terraform/pull/27357#issuecomment-1093269075
For what it is worth, I am continuing to champion the extendable functions concept. However, there is no update to share.
Hello, it would really be a plus in the integration of csv files from providers like Google. a concrete example on Google alert monitoring, it's possible to export in csv (Camel Case). The need would be to convert all map ids to Snake Case and integrate the file into Terraform even more easily.
Just FYI, https://github.com/hashicorp/terraform/issues/27696#issuecomment-1758977989
Is anyone interested in making a provider for these functions? https://github.com/hashicorp/terraform/issues/2771