terraform/website/source/docs/providers/local/r/file.html.md

630 B

layout page_title sidebar_current description
local Local: local_file docs-local-resource-file Generates a local file from content.

local_file

Generates a local file from a given content.

Example Usage

data "local_file" "foo" {
    content     = "foo!"
    filename = "${path.module}/foo.bar"
}

Argument Reference

The following arguments are supported:

  • content - (required) The content of file to create.

  • filename - (required) The path of the file to create.

NOTE: Any required parent folders are created automatically. Additionally, any existing file will get overwritten.