continueops_rbac_binding (Resource)
Grants a role on a set of runbooks to a subject: every member, an IdP group, or one person.
- Subject:
subject_kind = "all_members";"group"withsubject_group(and optionallyconnection_idto only match the group from one SSO connection); or"user"withsubject_user_id. - Scope:
scope_kind = "tenant"(every runbook);"tag"withscope_tag_id(runbooks carrying the tag); or"terraform_managed"(runbook templates written by Terraform, seemanaged_byoncontinueops_runbook_template).
Bindings only restrict anyone while continueops_rbac_settings has runbook_default_access = "bindings"; with the default, members, every member keeps full access and bindings are prepared but inert.
Changing the subject or the scope replaces the binding (briefly removing that access); role_id and description change in place.
Example Usage
data "continueops_rbac_role" "editor" {
key = "runbook_editor"
}
# Members of an IdP group may edit the runbooks carrying a tag.
resource "continueops_rbac_binding" "payments_owners" {
role_id = data.continueops_rbac_role.editor.id
subject_kind = "group"
subject_group = "CO-Payments-Runbook-Owners"
scope_kind = "tag"
scope_tag_id = continueops_tag.payments_critical.id
description = "Payments team owns its runbooks"
}
# Every member may run the runbooks Terraform manages.
resource "continueops_rbac_binding" "everyone_runs_managed" {
role_id = continueops_rbac_role.operator.id
subject_kind = "all_members"
scope_kind = "terraform_managed"
}Schema
Required
role_id(String) Id of the role granted: acontinueops_rbac_roleresource, or a built-in role via thecontinueops_rbac_roledata source. Can be changed in place.scope_kind(String) Which runbooks:tenant,tagorterraform_managed.subject_kind(String) Who gets the role:all_members,grouporuser.
Optional
connection_id(String) Only withsubject_kind = "group": match the group only for people who signed in through thiscontinueops_sso_connection. Null: the group from any connection.description(String) Why the binding exists.scope_tag_id(String) Id of thecontinueops_tag. Required whenscope_kindistag, otherwise not allowed.subject_group(String) The IdP group, as the IdP sends it. Required whensubject_kindisgroup, otherwise not allowed.subject_user_id(String) User id of the person. Required whensubject_kindisuser, otherwise not allowed.timeouts(Attributes) (see below for nested schema)
Read-Only
created_at(String) When the binding was created (RFC 3339, UTC).created_by(String) User id of whoever created it (the API key's owner).id(String) Binding id (UUID).tenant_id(String) Id of the tenant (UUID).
Nested Schema for timeouts
Optional:
create(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).delete(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.read(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.update(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
Import is supported using the following syntax:
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
import {
to = continueops_rbac_binding.example
id = "00000000-0000-4000-8000-000000000000"
}The terraform import command can be used, for example:
# Import by id (UUID).
terraform import continueops_rbac_binding.example 00000000-0000-4000-8000-000000000000