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

     1  ---
     2  layout: "ignition"
     3  page_title: "Ignition: ignition_file"
     4  sidebar_current: "docs-ignition-datasource-file"
     5  description: |-
     6    Describes a file to be written in a particular filesystem.
     7  ---
     8  
     9  # ignition\_file
    10  
    11  Describes a file to be written in a particular filesystem.
    12  
    13  ## Example Usage
    14  
    15  File with inline content:
    16  
    17  ```hcl
    18  data "ignition_file" "hello" {
    19  	filesystem = "foo"
    20  	path = "/hello.txt"
    21  	content {
    22  		content = "Hello World!"
    23  	}
    24  }
    25  ```
    26  
    27  File with remote content:
    28  
    29  ```hcl
    30  data "ignition_file" "hello" {
    31  	filesystem = "qux"
    32  	path = "/hello.txt"
    33  	source {
    34  		source = "http://example.com/hello.txt.gz"
    35  		compression = "gzip"
    36  		verification = "sha512-0123456789abcdef0123456789...456789abcdef"
    37  	}
    38  }
    39  ```
    40  
    41  ## Argument Reference
    42  
    43  The following arguments are supported:
    44  
    45  * `filesystem` - (Optional) The internal identifier of the filesystem. This matches the last filesystem with the given identifier. This should be a valid name from a _ignition\_filesystem_ resource.
    46  
    47  * `path` - (Optional) The absolute path to the file.
    48  
    49  * `content` - (Optional) Block to provide the file content inline.
    50  
    51  * `source` - (Optional) Block to retrieve the file content from a remote location.
    52  
    53  	__Note__: `content` and `source` are mutually exclusive
    54  
    55  * `mode` - (Optional) The list of partitions and their configuration for 
    56  this particular disk..
    57  
    58  * `uid` - (Optional) The user ID of the owner.
    59  
    60  * `gid` - (Optional) The group ID of the owner.
    61  
    62  The `content` block supports:
    63   
    64  * `mime` - (Required) MIME format of the content (default _text/plain_).
    65  
    66  * `content` - (Required) Content of the file.
    67  
    68  The `source` block supports:
    69  
    70  * `source` - (Required) The URL of the file contents. When using http, it is advisable to use the verification option to ensure the contents haven’t been modified.
    71  
    72  * `compression` - (Optional) The type of compression used on the contents (null or gzip).
    73  
    74  * `verification` - (Optional) The hash of the config, in the form _\<type\>-\<value\>_ where type is sha512.
    75  
    76  ## Attributes Reference
    77  
    78  The following attributes are exported:
    79  
    80  * `id` - ID used to reference this resource in _ignition_config_.