title | categorySlug | slug | parentDocSlug | hidden | order |
---|---|---|---|---|---|
scalr_run_trigger |
scalr-terraform-provider |
provider_resource_scalr_run_trigger |
provider_resources |
false |
14 |
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.
data "scalr_workspace" "downstream" {
name = "downstream"
environment_id = "env-xxxxxxxxxx"
}
data "scalr_workspace" "upstream" {
name = "upstream"
environment_id = "env-xxxxxxxxxx"
}
resource "scalr_run_trigger" "set_downstream" {
# run automatically triggered in this workspace once the run in the upstream workspace is applied
downstream_id = data.scalr_workspace.downstream.id
upstream_id = data.scalr_workspace.upstream.id
}
downstream_id
(String) The identifier of the workspace in which new runs will be triggered.upstream_id
(String) The identifier of the upstream workspace.
id
(String) The ID of this resource.
Import is supported using the following syntax:
terraform import scalr_run_trigger.example rt-xxxxxxxxxx