Resource scalr_run_trigger

Run triggers are a way to chain workspaces together.
The use case for this is that you might have one or more upstream workspaces that need to automatically kick off a downstream workspace based on a successful run in the upstream workspace.
To set a trigger, go to the downstream workspace and set the upstream workspace(s).
Now, whenever the upstream workspace has a successful run, the downstream workspace will automatically start a run.

Example Usage

Basic usage:

data "scalr_workspace" "downstream" {
  name           = "downstream"
  environment_id = "env-xxxxxxxxx"

data "scalr_workspace" "upstream" {
  name           = "upstream"
  environment_id = "env-xxxxxxxxx"

resource "scalr_run_trigger" "set_downstream" {
   downstream_id  = # run automatically triggered in this workspace once the run in the upstream workspace is applied
   upstream_id =

Argument Reference

  • downstream_id - (Required) The identifier of the workspace in which new runs will be triggered.
  • upstream_id (Required) The identifier of the upstream workspace.

Attribute Reference

All arguments plus:

  • id - The identifier of the created trigger


To import an existing run trigger use its identifier. For example:

terraform import scalr_run_trigger.set_downstream rt-xxxxxxxxxx