pulumi / pulumi-command

Apache License 2.0
63 stars 26 forks source link

CopyFile: support assets, archives, and recursive copying #423

Closed thomas11 closed 3 months ago

thomas11 commented 5 months ago

This PR allows the CopyFile resource to recursively copy directories as well, similar to scp -r.

This PR enhances the CopyFile resource in a few ways.

In light of these changes, I've renamed CopyFile to just Copy which is a breaking change.

Resolves #23 Resolves #33 Resolves #42

TODO

Design considerations

The behavior of the copy operation was modeled after cp and scp.

source | dest - exists as dir | dest - does not exist | dest - exists as file
-------|----------------------|-----------------------|-----------------------
dir    | dest/dir             | dest/dir              | error
dir/   | dest/x for x in dir  | dest/dir              | error
file   | dest/file            | dest                  | dest (overwritten)

Specifically:

Implementation notes