-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
provide means of getting set of folders #32654
Comments
Thanks for this request! |
If I wanted to work on and submit a PR for this functionality should I just reference this ticket, or is more feedback and feature detail required? I have a use case for a |
This sort of functionality could also (co-)exist as a data source of the |
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! |
I know this not been implemented yet, but you can achieve it through with below sample
|
Terraform Version
Use Cases
I have a terraform root module that needs to find all the sibling root modules to get some json files there (which it will use to generate IAM policies to be used in those other root modules, but that is not important). Eg
and manager folder has tf code with
fileset("..", "root*")
, the result will be empty.Attempted Solutions
Use
[for x in fileset("..", "root*/variables.tf"): dirname(x)]
which as you can see is way more complicated than necessaryProposal
Make
fileset()
support folders / directories too, or create a new functiondirset()
References
No response
The text was updated successfully, but these errors were encountered: