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

     1  ---
     2  layout: "archive"
     3  page_title: "Archive: archive_file"
     4  sidebar_current: "docs-archive-datasource-archive-file"
     5  description: |-
     6    Generates an archive from content, a file, or directory of files.
     7  ---
     8  
     9  # archive_file
    10  
    11  Generates an archive from content, a file, or directory of files.
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  data "archive_file" "init" {
    17    type        = "zip"
    18    source_file = "${path.module}/init.tpl"
    19    output_path = "${path.module}/files/init.zip"
    20  }
    21  ```
    22  
    23  ## Argument Reference
    24  
    25  The following arguments are supported:
    26  
    27  NOTE: One of `source_content_filename` (with `source_content`), `source_file`, or `source_dir` must be specified.
    28  
    29  * `type` - (required) The type of archive to generate.
    30    NOTE: `zip` is supported.
    31  
    32  * `output_path` - (required) The output of the archive file.
    33  
    34  * `source_content` - (optional) Add only this content to the archive with `source_content_filename` as the filename.
    35  
    36  * `source_content_filename` - (optional) Set this as the filename when using `source_content`.
    37  
    38  * `source_file` - (optional) Package this file into the archive.
    39  
    40  * `source_dir` - (optional) Package entire contents of this directory into the archive.
    41  
    42  ## Attributes Reference
    43  
    44  The following attributes are exported:
    45  
    46  * `output_size` - The size of the output archive file.
    47  
    48  * `output_sha` - The SHA1 checksum of output archive file.
    49  
    50  * `output_base64sha256` - The base64-encoded SHA256 checksum of output archive file.
    51  
    52  * `output_md5` - The MD5 checksum of output archive file.