terraform-provider-file/docs/data-sources/local.md

919 B

page_title subcategory description
file_local Data Source - file Local File DataSource

file_local (Data Source)

Local File DataSource

Example Usage

# tflint-ignore: terraform_unused_declarations
data "file_local" "basic_example" {
  name      = "example.txt"
  directory = "."
}

Schema

Required

  • directory (String) The directory where the file exists.
  • name (String) File name, required.

Optional

  • hmac_secret_key (String, Sensitive) A string used to generate the file identifier, you can pass this value in the environment variable TF_FILE_HMAC_SECRET_KEY.

Read-Only

  • contents (String) The file contents.
  • id (String) Identifier derived from sha256+HMAC hash of file contents.
  • permissions (String) The file permissions.