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

Support symlink

Open moajo opened this issue 5 years ago • 5 comments

Hi!

This PR is as implementation of #6 Support for symlink file/dir archive and Excludes option. All symlink files will be resolves and included in the archive file.

moajo avatar May 12 '20 05:05 moajo

Is there any chance this could be merged in? It would solve an annoying problem we have

no-acl avatar Sep 08 '20 14:09 no-acl

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Nov 22 '20 08:11 hashicorp-cla

This branch was out-of-date to master for a few months, so I rebased onto master and rebuilt this PR.

And since Travis' symlink feature wasn't enabled in the Windows environment, I modified the travis.yml and passed all the tests.

@wilkmaia Is it possible that this PR will be merged?

moajo avatar Dec 09 '20 02:12 moajo

Hi, sorry to hassle maintainers, but this feels like its ready (or extremely close to it) for merge, and @moajo has done their best to keep it up to date with master/main. its not a huge bug, but it is a really awkward problem to work around and while a fix is present it seems a shame not to get it merged.

Is there anything anyone can do to get this prioritised for a merge?

I actually came across this because i have had a lot of issues with archive_file zip files creating oddly malformed symlinks. I was going to take a stab at fixing the issue, but given my major lack of Go knowledge I was really happy to find that someone better at this than me had already solved the problem!

It would really great to get this bug squashed :)

I would also note that @wilkmaia already approved the PR, so i'm guessing it must be pretty much ready to go?

barneyparker avatar May 11 '21 17:05 barneyparker

@moajo A question about your PR.

For AWS lambda I am using virtualenv within docker container (using the official lambda image) that creates some symlinks in /venv/path/bin .

Outside the container these links looks like they are broken.

ls -la layers/packages/ansible/bin/python
lrwxrwxrwx 1 root root 23 Dez  3 07:56 layers/packages/ansible/bin/python -> /var/lang/bin/python3.8

Does your implementation covers archiving these kind of symlinks?

gthieleb avatar Dec 03 '21 07:12 gthieleb

@moajo as the archive provider has now been migrated from SDKv2 to the Terraform Plugin Framework, I have incorporated your changes from this PR into #183 and added you as a coauthor as the vast majority of the changes are in this PR. The only significant change I made in #183 was the handling of symbolic links that are using an absolute path. If you would rather rebase this PR on the latest main then please go ahead and I will close out #183. Thank you very much for your contribution.

bendbennett avatar Jan 26 '23 13:01 bendbennett

Implemented in #183 and released in v2.4.0.

bendbennett avatar Sep 08 '23 08:09 bendbennett

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar May 24 '24 13:05 github-actions[bot]