-
Notifications
You must be signed in to change notification settings - Fork 567
Open
Labels
Description
What problem are you facing?
Includes causes the execution to fail if the file doesn't exist.
Forcing either empty files where they are not needed, or custom templates for each situation.
This is especially annoying in a recursive setup with submodules where the template is only defined at the top level in .terraform-docs.yaml
How could terraform-docs help solve your problem?
An include statement that checks for the file first and skips it if it is missing.
Suggestions for syntax:
{{ optional_include "examples/example-1/main.tf" }}
{{ include_nofail "examples/example-1/main.tf" }}
{{ include "?examples/example-1/main.tf" }}
awiesner4, seggcsont, Joerg-L, Jenkins2739, mgzenitech and 5 more