Summary Plugin
The summary plugin posts plan summaries as MR/PR comments. It is enabled by default and collects results from all other plugins (cost, policy) into a single comment.
Configuration
extensions:
summary:
enabled: true # default: true (opt out with false)
on_changes_only: false # only comment when there are changes
include_details: true # include full plan output in expandable sections
labels:
- terraform
- "{environment}"
- "{module}"
- "resource:{resource_type}"Options
enabled
Enable or disable the summary plugin. Since summary uses EnabledByDefault policy, it is active unless explicitly disabled.
extensions:
summary:
enabled: false # disable plan summary commentson_changes_only
Only post a comment when the plan contains changes (add/change/destroy).
extensions:
summary:
on_changes_only: trueinclude_details
Include full plan output in expandable <details> sections within the comment.
extensions:
summary:
include_details: true # defaultlabels
Synchronize TerraCI-managed MR/PR labels after posting the summary comment.
extensions:
summary:
labels:
- terraform
- "{environment}"
- "{module}"
- "resource:{resource_type}"Static labels are added once. Templates without resource placeholders expand once per changed or failed module. Templates with resource_* placeholders expand once per changed Terraform resource in changed modules.
Supported placeholders:
| Placeholder | Value |
|---|---|
{module_id} | Plan result module ID |
{module_path} | Plan result module path |
{status} | Plan result status |
{service}, {environment}, {region}, {module} | Structure components from structure.pattern |
| custom segment names | Any custom component from structure.pattern |
{resource_address} | Terraform resource address |
{resource_type} | Terraform resource type |
{resource_name} | Terraform resource name |
{resource_action} | Terraform action (create, update, delete, replace, read) |
Empty or unresolved labels are skipped with a warning. Generated labels are trimmed, deduplicated, sorted, and preserve case.
Label synchronization is managed: TerraCI removes only labels that were generated by a previous TerraCI summary comment and are absent in the current run. User-owned labels are not removed. Label sync failures are warning-only; comment publishing errors still fail terraci summary.
CLI Command
terraci summaryThe terraci summary command scans for plan results in the service directory, loads plugin reports (cost, policy, tfupdate), composes a markdown comment, posts it to the MR/PR via the active CI provider's comment service, and synchronizes configured managed labels when the provider supports labels.