github.com/jmbataller/terraform@v0.6.8-0.20151125192640-b7a12e3a580c/website/source/docs/providers/aws/r/s3_bucket_object.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_s3_bucket_object"
     4  side_bar_current: "docs-aws-resource-s3-bucket-object"
     5  description: |-
     6    Provides a S3 bucket object resource.
     7  ---
     8  
     9  # aws\_s3\_bucket\_object
    10  
    11  Provides a S3 bucket object resource.
    12  
    13  ## Example Usage
    14  
    15  ### Uploading a file to a bucket
    16  
    17  ```
    18  resource "aws_s3_bucket_object" "object" {
    19  	bucket = "your_bucket_name"
    20  	key = "new_object_key"
    21  	source = "path/to/file"
    22  }
    23  ```
    24  
    25  ## Argument Reference
    26  
    27  The following arguments are supported:
    28  
    29  * `bucket` - (Required) The name of the bucket to put the file in.
    30  * `key` - (Required) The name of the object once it is in the bucket.
    31  * `source` - (Required) The path to the source file being uploaded to the bucket.
    32  * `content` - (Required unless `source` given) The literal content being uploaded to the bucket.
    33  * `cache_control` - (Optional) Specifies caching behavior along the request/reply chain Read [w3c cache_control](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) for futher details.
    34  * `content_disposition` - (Optional) Specifies presentational information for the object. Read [wc3 content_disposition](http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1) for further information.
    35  * `content_encoding` - (Optional) Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. Read [w3c content encoding](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11) for further information.
    36  * `content_language` - (Optional) The language the content is in e.g. en-US or en-GB.
    37  * `content_type` - (Optional) A standard MIME type describing the format of the object data, e.g. application/octet-stream. All Valid MIME Types are valid for this input.
    38  
    39  Either `source` or `content` must be provided to specify the bucket content.
    40  These two arguments are mutually-exclusive.
    41  
    42  ## Attributes Reference
    43  
    44  The following attributes are exported
    45  
    46  * `id` - the `key` of the resource supplied above
    47  * `etag` - the ETag generated for the object. This is often the MD5 hash of the
    48  object, unless you specify your own encryption keys