Open snuggie12 opened 2 years ago
Hi I want to work on this issue. Could you please assign it to me, it would be beneficial for my academics too. I have experience working on docker and vagrant. Thanks
Hi @HariVamsiK, it is possible to assign this to you, however an implementation PR would be unlikely to be accepted at this time. The reason is that an ipsort
function would need to be built as a plugin function provider, as opposed to a function built into Terraform. As such it is waiting for the implementation of plugin function providers. Please see:
I will bring this issue to triage to double-check whether this could be considered a core function or not. Thanks for your patience and interest in contributing to Terraform!
Hi @HariVamsiK, I confirmed this functionality would not be considered "core" to Terraform and thus would need to wait for the future function provider framework. Thanks for your interest in this issue!
Thank you for your continued interest in this issue.
Terraform version 1.8 launches with support of provider-defined functions. It is now possible to implement your own functions! We would love to see this implemented as a provider-defined function.
Please see the provider-defined functions documentation to learn how to implement functions in your providers. If you are new to provider development, learn how to create a new provider with the Terraform Plugin Framework. If you have any questions, please visit the Terraform Plugin Development category in our official forum.
We hope this feature unblocks future function development and provides more flexibility for the Terraform community. Thank you for your continued support of Terraform!
Terraform Version
Use Cases
sort
sorts lexicographically as you know which puts11.x.y.z
before3.x.y.z
. I'm usingtoset
which unorders things as well.It'd be nice if there was a function to sort IP addresses.
Attempted Solutions
For now I think I will use
sort(tolist(toset()))
which although not sorted does return a consistent ordering.Proposal
Whether there's any advantage to making IPv4 and IPv6 official types I'm not sure, but if that's one easy way to achieve a sort via
sort
(i.e. not makingipsort
but instead enhancingsort
) then that's great.References
No response