ContinueOps

    continueops

    by: ContinueOps·Resilience & Disaster Recovery

    Published
    Published 4 days ago
    Version
    0.4.0
    Source
    app.terraform.io/continueops/continueops
    Documentation

    continueops_rbac_role (Resource)

    A custom runbook access role: a named set of permissions that a continueops_rbac_binding grants on a scope.

    Every tenant also has the built-in roles runbook_viewer, runbook_runner, runbook_editor and runbook_manager. They cannot be changed, and their ids differ between environments, so refer to them with the continueops_rbac_role data source rather than managing them here.

    Destroying a role that a binding still uses fails with a conflict; destroy or repoint the bindings first (Terraform does this for you when they reference the role).

    Example Usage

    # A custom role: may view and run runbooks, not change them.
    resource "continueops_rbac_role" "operator" {
      key         = "payments_operator"
      name        = "Payments operator"
      description = "Runs the payments failover runbooks during an incident"
      permissions = ["view", "run"]
    }

    Schema

    Required

    • key (String) Stable key, unique within the tenant and different from the built-in keys: lower-case letters, digits, _, . or -, starting with a letter or digit, at most 63 characters.
    • name (String) Display name.
    • permissions (Set of String) What the role allows on runbooks in its scope, at least one of view, run, edit and delete.

    Optional

    Read-Only

    • created_at (String) When the role was created (RFC 3339, UTC).
    • created_by (String) User id of whoever created it (the API key's owner).
    • id (String) Role id (UUID).
    • tenant_id (String) Id of the tenant that owns the role (UUID).
    • updated_at (String) When the role last changed (RFC 3339, UTC).

    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_role.example
      id = "00000000-0000-4000-8000-000000000000"
    }

    The terraform import command can be used, for example:

    # Import a custom role by id (UUID). Built-in roles cannot be changed: use the
    # continueops_rbac_role data source for those.
    terraform import continueops_rbac_role.example 00000000-0000-4000-8000-000000000000