| page_title | cozystack_bucket Resource - cozystack |
|---|---|
| subcategory | |
| description | A Cozystack S3-compatible bucket, provisioned inside a tenant namespace. |
A Cozystack S3-compatible bucket, provisioned inside a tenant namespace.
resource "cozystack_bucket" "assets" {
name = "assets"
namespace = "tenant-root"
users = {
app = { readonly = false }
backup = { readonly = true }
}
# S3 credentials are published asynchronously, so without waiting they are
# only readable from the apply after the one that created the bucket.
wait_for_ready = true
}name(String) Bucket name (metadata.name). Immutable.namespace(String) Tenant namespace the bucket is created in. Immutable.
locking(Boolean) Provision the bucket with object lock enabled.storage_pool(String) Selects a specific BucketClass by storage pool name.users(Attributes Map) Bucket users keyed by user name. (see below for nested schema)wait_for_ready(Boolean) Block on create/update until theReadycondition is true and any server-generated outputs the resource exposes are readable.wait_timeout(String) Maximum time to wait whenwait_for_readyis set (Go duration, e.g.10m). Readiness and outputs share this budget; outputs that never appear leave a warning and their attributes stay null until the next refresh.
chart_version(String) Deployed chart version (status.version).credentials(Attributes Map, Sensitive) S3 credentials per user (from thebucket-<name>-<user>Secret). Populated once the bucket claim is bound. (see below for nested schema)id(String) Synthetic identifier in the formnamespace/name.ready(Boolean) Whether the bucket'sReadycondition is true.uid(String) Server-assigned object UID (metadata.uid).
Optional:
readonly(Boolean) Whether the user has read-only access.
Read-Only:
access_key(String) S3 access key ID.bucket_name(String) Backing bucket name.endpoint(String) S3 endpoint URL.region(String) S3 region.secret_key(String) S3 secret access key.
Import is supported using the following syntax:
The terraform import command can be used, for example:
# Buckets are imported as "<namespace>/<name>".
terraform import cozystack_bucket.assets tenant-root/assets