• Docs
  • Common Use Cases
  • Custom Workflows
  • Trigger on Modules Update

Trigger on Modules Update

Create a directory dependency with the following rules:

  • Do not automatically run a Plan operation when the modules directory is updated.
  • Automatically run a Plan operation against the iam directory when the iam or modules directory is updated.

The following configuration creates a modules directory dependency for the iam directory:

dirs:
  modules:
    when_modified:
      file_patterns: []
  iam:
    when_modified:
      file_patterns: ["iam/*.tf", "iam/*.tfvars", "modules/*.tf"]