Copy
Copy
The copy resource allows files and directories to be copied from one location to another.
Attributes
Source source
required
type: string
Source file, folder, url, git repo, etc
Destination destination
required
type: string
Destination file or directory to write file or files to.
Permissions permissions
type: string
default: 0777
Unix file permissions to apply to coppied files and direcories.
Computed Attributes
These attributes are computed when the config is parsed and applied, and are therefore only known at parsetime or runtime.
Meta ID meta.id
string
The full ID of the resource e.g. resource.type.name
.
This is computed from the full resource path:
resource "container" "ubuntu" {
...
}
// the resulting id will be resource.container.ubuntu | |
Meta Type meta.type
string
|
The type of the resource. This taken from the type label of the resource definition.
| |
Meta Name meta.name
string
|
The name of the resource. This taken from the name label of the resource definition.
| |
CopiedFiles copied_files
type: []string
| List of the full paths of copied files. |
Examples
Copy local files
Copy local files with relative path
Copy from url
Copy from git
Copy zip from url and automatically extract it
Last updated