ContinueOps

    continueops

    by: ContinueOps·Resilience & Disaster Recovery

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

    continueops_runbook_template (Resource)

    A runbook template: the runbook YAML plus its metadata and its links to tags and business continuity objectives.

    Changing yaml publishes a new version (current_version goes up by one). The platform only publishes a new version of a runbook linked to at least one BCO, so set bco_ids or bco_component_ids before changing yaml; this resource writes the links before the YAML in the same request, so adding a link and changing the YAML in one apply works.

    Destroy is a soft delete: run history keeps pointing at the template, and every schedule that fires it is disabled. Identifiers are unique for life, so creating a template with the identifier of a deleted one revives it, with its version history.

    Example Usage

    resource "continueops_runbook_template" "asg_az_failover" {
      identifier  = "aws-ec2-asg-az-failover"
      name        = "EC2 Auto Scaling AZ failover"
      yaml        = file("${path.module}/runbook.yaml")
      environment = "prod"
      tag_ids     = [continueops_tag.prod.id]
      bco_ids     = [continueops_bco.payments.id]
    }

    Schema

    Required

    • identifier (String) Stable identifier, unique within the tenant: lower-case letters, digits, ., _ or -, starting with a letter or digit, at most 128 characters. Changing it forces a new template.
    • name (String) Display name, 1 to 200 characters.
    • yaml (String) The runbook YAML, typically file("runbook.yaml"). At most 1,000,000 characters. Changing it publishes a new version, which needs at least one bco_ids or bco_component_ids link.

    Optional

    • allow_live_proof (Boolean) Whether runs of this runbook may perform live proof steps against real infrastructure. Default false.
    • bco_component_ids (Set of String) Ids of the continueops_bco_components this runbook protects, at most 200. Each also links the component's BCO.
    • bco_ids (Set of String) Ids of the continueops_bcos this runbook protects, at most 50.
    • description (String) Free-text description, at most 4000 characters.
    • environment (String) Environment the runbook acts on: prod, non_prod or unknown. Default unknown.
    • tag_ids (Set of String) Ids of continueops_tags on this template, at most 50.
    • timeouts (Attributes) (see below for nested schema)

    Read-Only

    • created_at (String) When the template was created (RFC 3339, UTC).
    • current_version (Number) The published version number. Starts at 1 and goes up by one each time yaml changes.
    • id (String) Template id (UUID).
    • updated_at (String) When the template 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_runbook_template.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_runbook_template.example 00000000-0000-4000-8000-000000000000