Introduction
When we create a workspace using a Version Control Workflow, the workspace can be configured to trigger runs only from the root directory and when there is a change to a non-root directory, Terraform will not trigger a run.
Prerequisites
- Terraform Cloud or Terraform Enterprise v202209-1
Use Case
The workspace configuration should be done like this:
-
Go to your desired Workspace in TFE/TFC > Settings > Version Control.
-
Under Workspace Settings > setup Terraform Working Directory to
.
-
Under Run Triggers > select Only trigger runs when files in specified paths change > under Syntax setup Pattern to
./*
and clickAdd pattern
-
Under Pull Requests untick [] Automatic speculative plans