toowoxx / terraform-provider-packer

Terraform Provider for HashiCorp Packer
Mozilla Public License 2.0
32 stars 7 forks source link

Possibly wrong use of resourceState.Directory #4

Closed UncleSamSwiss closed 2 years ago

UncleSamSwiss commented 2 years ago

In the following lines dir seems not to be used (sorry, I'm not a go expert): https://github.com/toowoxx/terraform-provider-packer/blob/9c1d43938fdeb3dfc04c1999d80a8fe355f19ed8/provider/data_source_files.go#L26-L34

I believe the two calls should be:

- filepath.Glob(resourceState.Directory.Value + ...
+ filepath.Glob(dir + ...
simaotwx commented 2 years ago

Thank you! It looks like you're correct. I'll fix this in a future version.