Skip to content

file

A regular file on a host: its content, mode and ownership.

step "example" {
file {
content = "..."
path = "..."
}
}
Name Type Required Description
content string Yes Exact content of the file.
group string No Owning group. Left as is when unset.
mode string No Octal permissions. Defaults to “0644”.
on_remove string No What happens on the host when this resource is removed: “forget” (default) leaves the file, “delete” removes it.
owner string No Owning user. Left as is when unset.
path string Yes Absolute path of the file on the host.

Conn3x sets these; reference them as conn3x_file.<circuit>__<step>["<host>"].<name>.

Name Type Description
sha256 string SHA-256 of the content, hex encoded.

A step lowers to the conn3x_file resource, one instance per host, and connects with its circuit’s ssh block.