Skip to content

rso_resource_labels (Resource)

The labels of one object of the tenant, for example env = "prod" on a bucket.

Access can be granted to the objects that carry a label, so labelling is an access-management action: it needs the right to manage labels and the permissions of the object's type for that object.

This resource owns the complete set of labels of the object; destroying it removes them all.

Example Usage

resource "rso_resource_labels" "media" {
  resource_type = "bucket"
  name          = rso_bucket.media.name

  labels = {
    env  = "prod"
    team = "web"
  }
}

Schema

Required

  • labels (Map of String) The labels, as key/value pairs.
  • name (String) Name of the object.
  • resource_type (String) Kind of object: bucket, queue, topic, app, postgresCluster, scheduledJob, registry, secret, volume, kubernetesCluster or aiModel.

Read-Only

  • id (String) <resource_type>/<name>.

Import

Import is supported using the following syntax:

# Import the labels of an object as <resource_type>/<name>.
terraform import rso_resource_labels.media bucket/media