tfe_run_trigger

HCP Terraform provides a way to connect your workspace to one or more workspaces within your organization, known as "source workspaces". These connections, called run triggers, allow runs to queue automatically in your workspace on successful apply of runs in any of the source workspaces. You can connect your workspace to up to 20 source workspaces.

Example Usage

Basic usage:

resource "tfe_organization" "test-organization" {
  name  = "my-org-name"
  email = "admin@company.com"
}

resource "tfe_workspace" "test-workspace" {
  name         = "my-workspace-name"
  organization = tfe_organization.test-organization.id
}

resource "tfe_workspace" "test-sourceable" {
  name         = "my-sourceable-workspace-name"
  organization = tfe_organization.test-organization.id
}

resource "tfe_run_trigger" "test" {
  workspace_id  = tfe_workspace.test-workspace.id
  sourceable_id = tfe_workspace.test-sourceable.id
}

Argument Reference

The following arguments are supported:

Attributes Reference

Import

Run triggers can be imported; use <RUN TRIGGER ID> as the import ID. For example:

terraform import tfe_run_trigger.test rt-qV9JnKRkmtMa4zcA