Skip to content

rso_bucket_key (Resource)

An S3 access key for the tenant's buckets. It can read and write every bucket of the tenant and nothing else. The secret is returned once, at creation, and stored in state.

Example Usage

# An S3-compatible bucket and an access key for it.
resource "rso_bucket" "assets" {
  name = "tf-example-assets"
}

resource "rso_bucket_key" "ci" {
  name = "tf-example-ci"
}

# Point any S3 client at these, with path-style addressing:
#   aws --endpoint-url <endpoint> s3 ls s3://<bucket>
output "bucket" {
  value = rso_bucket.assets.bucket
}

output "endpoint" {
  value = rso_bucket.assets.endpoint
}

output "access_key_id" {
  value = rso_bucket_key.ci.access_key_id
}

output "secret_access_key" {
  value     = rso_bucket_key.ci.secret_access_key
  sensitive = true
}

Schema

Required

  • name (String) Key name, unique within the tenant. Changing it creates a new key and revokes the old one.

Read-Only

  • access_key_id (String) S3 access key id.
  • id (String) The ID of this resource.
  • secret_access_key (String, Sensitive) S3 secret access key.