Skip to content

Missing a function to determine whether a directory exists at a given path. #33394

@minherz

Description

@minherz

Terraform Version

1.4.4

Use Cases

A path to configuration containing templates to be parsed is provided as an input variable. We are looking to validate the provided path before any resources will be created.

Attempted Solutions

We tried to use fileexists but the function returns an error:

Call to function "fileexists" failed: "_path-to-directory_" is a directory, not a file.

Proposal

Like it was suggested in #22260, having direxists or another function that is dedicated for directory existence check would be a reasonable solution.

References

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions