Copy copy
The copy
resource allows files and directories to be copied
from one location to another.
Properties
- Name
source
- Type
- (string: "")
- Required
- required
- Readonly
- Description
Source file or directory.
- Name
destination
- Type
- (string: "")
- Required
- required
- Readonly
- Description
Destination file or directory.
- Name
permissions
- Type
- (string: 0777)
- Required
- Readonly
- Description
Unix file permissions to apply to coppied files and direcories.
- Name
copied_files
- Type
- ([]string: [])
- Required
- Readonly
- readonly
- Description
List of the full paths of copied files.
Meta Properties
In addition to the main properties, all resources have meta
properties, such
as the id
of the resource. To see the list of these properties please see the
Meta Properties
section in the documentation /docs/resources/meta.
Examples
Copies files from ./myfiles and sets read / write permissions
resource "copy" "myfiles" {
source = "./myfolder"
destination = "./mydestination"
permissions = "0666"