github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/local/r/file.html.md (about)

     1  ---
     2  layout: "local"
     3  page_title: "Local: local_file"
     4  sidebar_current: "docs-local-resource-file"
     5  description: |-
     6    Generates a local file from content.
     7  ---
     8  
     9  # local_file
    10  
    11  Generates a local file with the given content.
    12  
    13  ~> **Note** When working with local files, Terraform will detect the resource
    14  as having been deleted each time a configuration is applied on a new machine
    15  where the file is not present and will generate a diff to re-create it. This
    16  may cause "noise" in diffs in environments where configurations are routinely
    17  applied by many different users or within automation systems.
    18  
    19  ## Example Usage
    20  
    21  ```hcl
    22  resource "local_file" "foo" {
    23      content     = "foo!"
    24      filename = "${path.module}/foo.bar"
    25  }
    26  ```
    27  
    28  ## Argument Reference
    29  
    30  The following arguments are supported:
    31  
    32  * `content` - (Required) The content of file to create.
    33  
    34  * `filename` - (Required) The path of the file to create.
    35  
    36  Any required parent directories will be created automatically, and any existing
    37  file with the given name will be overwritten.