plugins is an optional field in the Terraform spec.

Plugins are tasks that run during a workflow but are not part of the main workflow. Plugins can be treated as just another task, however, plugins do not have completion or failure detection.

Terraform Operator Workflow Diagram

Example definition of a plugin:

  plugins:
    monitor:
        image: ghcr.io/galleybytes/monitor:latest
        imagePullPolicy: IfNotPresent
        when: After
        task: setup

The above plugin task will run after the setup task has completed.

Alternatively, a plugin can be triggered to start at the same time of another task. For example:

  plugins:
    monitor:
        image: ghcr.io/galleybytes/monitor:latest
        imagePullPolicy: IfNotPresent
        when: At
        task: setup

Each plugin is run once per generation. Plugins that are older than the current generation are automatically reaped.