Skip to content

rso_iam_role (Resource)

A custom role: a named bundle of permissions that can be given to members and service accounts, for the whole tenant or for some objects only.

Access is only ever added: a role never takes a permission away. Managing roles needs the tenant's admin role, and nobody can put a permission into a role that they do not hold themselves.

Example Usage

resource "rso_iam_role" "queue_publisher" {
  name        = "queue-publisher"
  description = "May publish to queues and topics, nothing else"
  permissions = ["queues.read", "queues.publish"]
}

Schema

Required

  • name (String) Role name, unique within the tenant.
  • permissions (Set of String) Permissions the role carries, for example queues.publish or storage.buckets.read. The console's Access page lists them all.

Optional

  • description (String) What the role is for.

Read-Only

  • id (String) Same as name.

Import

Import is supported using the following syntax:

# Import a custom role by its name.
terraform import rso_iam_role.queue_publisher queue-publisher