Template provider: template_dir resource error

I new with terraform and I have problem:

I have template files structure with subdirectories e.g.

- sub_templates/

and resource in my .tf file as
resource “template_dir” “init” {
source_dir = “./my_templates”
destination_dir = “./.my_output”

when I run “terraform apply” in Windows GitBash or Powershell or just in cmd I got an error:

Error: open .my_output/sub_templates\sub_template.xml: The system cannot find the path specified

and actually there is no sub_templates directory in .my_output

what did I miss there? does template provider look to subdirectories or it can process only files in given source_dir?