Skip to content

Conversation

@bryanhonof
Copy link

Fixes #34694
Ref #33394
Ref #25316

Target Release

1.8.x

Draft CHANGELOG entry

NEW FEATURES

  • A new function directoryexists got implemented
  • A new function directoryset got implemented

@digital-content-events
Copy link

digital-content-events bot commented Feb 17, 2024

📄 Content Checks

Updated: Sat, 17 Feb 2024 16:20:50 GMT

Found 2 error(s)

docs/language/functions/directoryexists.mdx

Position Description Rule
1:1-1:1 This file is not present in the nav data file at data/language-nav-data.json. Either add a path that maps to this file in the nav data or remove the file. If you want the page to exist but not be linked in the navigation, add a hidden property to the associated nav node. no-unlinked-pages

docs/language/functions/directoryset.mdx

Position Description Rule
1:1-1:1 This file is not present in the nav data file at data/language-nav-data.json. Either add a path that maps to this file in the nav data or remove the file. If you want the page to exist but not be linked in the navigation, add a hidden property to the associated nav node. no-unlinked-pages

@bryanhonof
Copy link
Author

Not sure what I'm doing wrong for the content checks test to fail still.

@crw
Copy link
Contributor

crw commented Feb 20, 2024

Thanks for this submission! I will bring it up in triage to see if we will consider it for review. We may want to include these as built-ins given their mirrored file versions, or we may ask for these to be built as provider functions. Thanks again!

@felipekj
Copy link

Any estimate for when this feature will be released?

@crw
Copy link
Contributor

crw commented Dec 15, 2025

Apologies, I failed to report back on this one. This was happening around the time that provider-defined functions was being released, and there was some discussion as to whether these are more appropriate for a provider function. The process for determining whether something should be a built-in function or not was less mature at that time. Even if this was found to be acceptable, we would ask for this to be implemented in the local provider. In fact, you can see that the direxists function was implemented: https://registry.terraform.io/providers/hashicorp/local/latest/docs/functions/direxists

I think the path forward here would be to implement dirset (aka directoryset) in the local provider. Please comment if you believe another solution is more appropriate. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Directory equivalent of fileexists and fileset functions

3 participants