Terraform Cloud - Local file not created in specificed location

1.8k Views Asked by At

Code

resource "local_file" "sample" {
    content = "some text"
    filename = "${path.module}/sample.txt"
 }

File path details

  • module
    • local
      • test.tf --- here I pasted the above code
  • main.tf
  • var.tf

After terraform apply I couldn't see the sample.txt in any of the folder.

Everything looks good. I can see the log as local_file creation but in the specified location new file not created. I'm trying this from windows 10. Also tried from gitlab pipeline cant see the file. Terraform version 14.9 and local provider version is ~2.1.

Please provide a solution for this

0

There are 0 best solutions below