Created
October 7, 2022 17:10
-
-
Save dtelaroli/45c9ebf1d17275c30d3ff083d6932372 to your computer and use it in GitHub Desktop.
workaround to list all directories in a specific folder in terraform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locals { | |
subfolders = toset(distinct(flatten([for _, v in fileset(".", "./dir/**") : regex("./dir/([^/]*).*", dirname(v))]))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment