github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/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 18 ``` 19 data "ignition_file" "hello" { 20 filesystem = "foo" 21 path = "/hello.txt" 22 content { 23 content = "Hello World!" 24 } 25 } 26 ``` 27 28 File with remote content: 29 30 ``` 31 data "ignition_file" "hello" { 32 filesystem = "qux" 33 path = "/hello.txt" 34 source { 35 source = "http://example.com/hello.txt.gz" 36 compression = "gzip" 37 verification = "sha512-0123456789abcdef0123456789...456789abcdef" 38 } 39 } 40 ``` 41 42 ## Argument Reference 43 44 The following arguments are supported: 45 46 * `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. 47 48 * `path` - (Optional) The absolute path to the file. 49 50 * `content` - (Optional) Block to provide the file content inline. 51 52 * `source` - (Optional) Block to retrieve the file content from a remote location. 53 54 __Note__: `content` and `source` are mutually exclusive 55 56 * `mode` - (Optional) The list of partitions and their configuration for 57 this particular disk.. 58 59 * `uid` - (Optional) The user ID of the owner. 60 61 * `gid` - (Optional) The group ID of the owner. 62 63 The `content` block supports: 64 65 * `mime` - (Required) MIME format of the content (default _text/plain_). 66 67 * `content` - (Required) Content of the file. 68 69 The `source` block supports: 70 71 * `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. 72 73 * `compression` - (Optional) The type of compression used on the contents (null or gzip). 74 75 * `verification` - (Optional) The hash of the config, in the form _\<type\>-\<value\>_ where type is sha512. 76 77 ## Attributes Reference 78 79 The following attributes are exported: 80 81 * `id` - ID used to reference this resource in _ignition_config_.