terraform-provider-local icon indicating copy to clipboard operation
terraform-provider-local copied to clipboard

Path ending in '/' should ignore content and just create dir

Open innovate-invent opened this issue 3 years ago • 2 comments

Terraform Version

0.13.5

Affected Resource(s)

local_file

Terraform Configuration Files

resource "local_file" "dir" {
  filename = "${path.module}/subfolder/"
  directory_permission = "0700"
}

Expected Behavior

Create path with permission

Actual Behavior

Error: open /home/nolan/Projects/docker/subfolder/: is a directory

Steps to Reproduce

  1. terraform apply

innovate-invent avatar Nov 13 '20 02:11 innovate-invent

I'm tempted to say there should be a local_dir resource instead....

tristanmorgan avatar Nov 13 '20 03:11 tristanmorgan

True

innovate-invent avatar Nov 13 '20 03:11 innovate-invent