Skip to main content
The file provisioner copies files or directories from the machine running Terraform to the newly created resource. The file provisioner supports both ssh and winrm type connections. See file

Initializer

import "github.com/open-constructs/cdk-terrain-go/cdktn"

&cdktn.FileProvisioner {
	Destination: *string,
	Type: *string,
	Connection: interface{},
	Content: *string,
	Source: *string,
}

Properties

NameTypeDescription
Destination*stringThe source file or directory.
Type*stringNo description.
Connectioninterface{}Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.
Content*stringThe destination path to write to on the remote system.
Source*stringThe direct content to copy on the destination.

DestinationRequired

Destination *string
  • Type: *string
The source file or directory. Specify it either relative to the current working directory or as an absolute path. This argument cannot be combined with content.

TypeRequired

Type *string
  • Type: *string

ConnectionOptional

Connection interface{}
  • Type: interface{}
Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.

ContentOptional

Content *string
  • Type: *string
The destination path to write to on the remote system. See Destination Paths below for more information.

SourceOptional

Source *string
  • Type: *string
The direct content to copy on the destination. If destination is a file, the content will be written on that file. In case of a directory, a file named tf-file-content is created inside that directory. We recommend using a file as the destination when using content. This argument cannot be combined with source.