scalr_drift_detection

Resource: scalr_drift_detection

Manages the state of Drift Detection Scheduler in Scalr.

Example Usage

resource "scalr_drift_detection" "example" {
  environment_id = "env-xxxxx"
  check_period   = "weekly"
}

resource "scalr_drift_detection" "example" {
  environment_id = "env-xxxxx"
  check_period   = "weekly"
  run_mode       = "plan"
  workspace_filters {
    name_patterns = ["prod", "stage-*"]
  }
}

Schema

Required

  • check_period (String) Check period for drift detection: daily or weekly.
  • environment_id (String) ID of the environment, in the format env-<RANDOM STRING>.

Optional

  • run_mode (String) Run mode for drift detection: refresh-only (default) or plan.
  • workspace_filters (Block, Optional) Filters for workspaces to be included in drift detection. Only one type of filter can be specified: name_patterns, environment_types or tags. (see below for nested schema)

Read-Only

  • id (String) The ID of this resource.

Nested Schema for workspace_filters

Optional:

  • environment_types (Set of String) Workspace environment types to include in drift detection. Allowed values: production, staging, testing, development, unmapped.
  • name_patterns (Set of String) Workspace name patterns to include in drift detection. Supports * wildcard (e.g., prod-*).
  • tags (Set of String) Workspace tag to include in drift detection. A workspace matches if it has at least one of the specified tags.

Import

Import is supported using the following syntax:

terraform import scalr_drift_detection.example dds-xxxxxxxxxx