» yandex_storage_object

Allows management of Yandex.Cloud Storage Object.

» Example Usage

Example creating an object in an existing cat-pictures bucket.

resource "yandex_storage_object" "cute-cat-picture" {
  bucket = "cat-pictures"
  key    = "cute-cat"
  source = "/images/cats/cute-cat.jpg"
}

» Argument Reference

The following arguments are supported:

  • bucket - (Required) The name of the containing bucket.

  • key - (Required) The name of the object once it is in the bucket.

  • source - (Optional, conflicts with content and content_base64) The path to a file that will be read and uploaded as raw bytes for the object content.

  • content - (Optional, conflicts with source and content_base64) Literal string value to use as the object content, which will be uploaded as UTF-8-encoded text.

  • content_base64 - (Optional, conflicts with source and content) Base64-encoded data that will be decoded and uploaded as raw bytes for the object content. This allows safely uploading non-UTF8 binary data, but is recommended only for small content such as the result of the gzipbase64 function with small text strings. For larger objects, use source to stream the content from a disk file.

  • access_key - (Optional) The access key to use when applying changes. If omitted, storage_access_key specified in config is used.

  • secret_key - (Optional) The secret key to use when applying changes. If omitted, storage_secret_key specified in config is used.

  • acl - (Optional) The predefined ACL to apply. Defaults to private.

» Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - The key of the resource.