ContinueOps

    continueops

    by: ContinueOps·Resilience & Disaster Recovery

    Published
    Published 3 days ago
    Version
    0.1.0
    Source
    app.terraform.io/continueops/continueops
    Documentation

    continueops_exercise_scenario (Resource)

    A reusable tabletop exercise scenario in the scenario library (Exercises → Scenarios): the disruption, what the exercise must prove (objectives), the services it exercises, and the timed injects released to participants.

    This resource is the scenario only. Running an exercise from it (scheduling it, releasing, skipping or answering injects) is an operation on a live exercise and is not modelled; an exercise copies the scenario's injects when it is created, so changing a scenario never changes an exercise already planned or run.

    Destroy archives the scenario (status archived), as the console does; scenarios are never deleted, because one that backs an exercise is part of that exercise's evidence. An archived scenario still exists: if it is archived outside Terraform, the next plan shows status changing back and applying restores it.

    Example Usage

    resource "continueops_exercise_scenario" "payments_ransomware" {
      title               = "Ransomware on the payments platform"
      description         = "Payments hosts in both availability zones are encrypted at 09:00 on a trading day."
      disruption_category = "cyber"
      status              = "published"
      business_units      = ["Payments", "ICT"]
      regions             = ["London"]
      service_ids         = [continueops_service.payments.id]
    
      objectives = [
        "Prove the 4-hour RTO for card payments",
        "Stand up the incident bridge within 15 minutes",
      ]
    
      # In release order; reordering is an in-place update.
      injects = [
        {
          prompt        = "The SOC reports encrypted hosts across two AZs. Declare a major incident now?"
          response_type = "multiple_choice"
          options       = ["Declare now", "Wait for more information"]
        },
        {
          delay_minutes = 20
          prompt        = "The regulator notification clock has started. Who signs off the notification?"
          response_type = "free_text"
        },
        {
          delay_minutes = 40
          prompt        = "Approve the pre-drafted customer holding statement?"
          response_type = "approval"
        },
      ]
    }

    Schema

    Required

    • title (String) Scenario title, 1 to 200 characters, without surrounding whitespace.

    Optional

    • business_units (Set of String) Business units the scenario involves (free text, at most 100).
    • description (String) The disruption, as participants are briefed on it. At most 20000 characters. Default empty.
    • disruption_category (String) How the scenario is classified on the testing coverage matrix: cyber, technology_failure, supplier, people, premises, third_party or data_loss. Null leaves it unclassified.
    • injects (Attributes List) The injects, in release order (at most 100). Reordering them is an in-place update. The platform numbers them by position (inj-1, inj-2, ...), as the console does. (see below for nested schema)
    • objectives (List of String) What the exercise must prove, in the order shown (at most 50, distinct), e.g. "Prove the 4-hour RTO for payments".
    • regions (Set of String) Sites or regions the scenario involves (free text, at most 100).
    • service_ids (Set of String) Ids of the services (continueops_service) the scenario exercises; drives the testing coverage matrix.
    • status (String) draft or published (offered when an exercise is planned). Default draft. Reads as archived if the scenario was archived outside Terraform; applying puts it back.
    • timeouts (Attributes) (see below for nested schema)

    Read-Only

    • created_at (String) When the scenario was created (RFC 3339, UTC).
    • id (String) Scenario id (UUID).
    • source (String) How the scenario was authored: imported for scenarios created through the API (the platform has no terraform value), manual or chat for ones authored in the console and then imported into Terraform.
    • source_bcp_document_id (String) The business continuity plan a console-drafted scenario was generated from; null otherwise. Not settable.
    • source_bcp_version (Number) The version of that plan at generation time; null otherwise. Not settable.
    • updated_at (String) When the scenario last changed (RFC 3339, UTC).

    Nested Schema for injects

    Required:

    • prompt (String) What participants are told and asked, 1 to 4000 characters.

    Optional:

    • delay_minutes (Number) Minutes after the exercise starts at which the inject is due, 0-10080. Default 0.
    • options (List of String) The choices for a multiple-choice inject, in order (at most 20, distinct). Default none.
    • response_type (String) How participants answer: multiple_choice (one of options), free_text or approval (approve / reject / escalate). Null lets the platform decide when the exercise starts: multiple choice if there are options, otherwise free text.

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

    The terraform import command can be used, for example:

    # Import by id (UUID), shown in the ContinueOps UI and returned by the API.
    terraform import continueops_exercise_scenario.example 00000000-0000-4000-8000-000000000000