github.com/hashicorp/packer@v1.14.3/website/content/partials/provisioner/file/Config-required.mdx (about)

     1  <!-- Code generated from the comments of the Config struct in provisioner/file/provisioner.go; DO NOT EDIT MANUALLY -->
     2  
     3  - `content` (string) - This is the content to copy to `destination`. If destination is a file,
     4    content will be written to that file, in case of a directory a file named
     5    `pkr-file-content` is created. It's recommended to use a file as the
     6    destination. The `templatefile` function might be used here, or any
     7    interpolation syntax. This attribute cannot be specified with source or
     8    sources.
     9  
    10  - `source` (string) - The path to a local file or directory to upload to the
    11    machine. The path can be absolute or relative. If it is relative, it is
    12    relative to the working directory when Packer is executed. If this is a
    13    directory, the existence of a trailing slash is important. Read below on
    14    uploading directories. Mandatory unless `sources` is set.
    15  
    16  - `destination` (string) - The path where the file will be uploaded to in the machine. This value
    17    must be a writable location and any parent directories
    18    must already exist. If the provisioning user (generally not root) cannot
    19    write to this directory, you will receive a "Permission Denied" error.
    20    If the source is a file, it's a good idea to make the destination a file
    21    as well, but if you set your destination as a directory, at least make
    22    sure that the destination ends in a trailing slash so that Packer knows
    23    to use the source's basename in the final upload path. Failure to do so
    24    may cause Packer to fail on file uploads. If the destination file
    25    already exists, it will be overwritten.
    26  
    27  <!-- End of code generated from the comments of the Config struct in provisioner/file/provisioner.go; -->