CI Templates
The ci.templates section configures custom Markdown templates for job summaries and PR comments.
Templates use Go template syntax with access to plan/apply context data.
Configuration
atmos.yaml
ci.templates.base_pathDirectory containing custom template files, relative to the repository root.
Default:
.atmos/ci/templatesci.templates.terraform.planFilename of the custom plan summary template within the base path.
Default: Built-in template
ci.templates.terraform.applyFilename of the custom apply summary template within the base path.
Default: Built-in template
Template Context
Templates receive a context object with plan/apply data.
Plan Template Variables
| Variable | Type | Description |
|---|---|---|
.Component | string | Component name |
.Stack | string | Stack name |
.Command | string | Terraform command (plan) |
.HasChanges | bool | Whether the plan has changes |
.Additions | int | Number of resources to create |
.Changes | int | Number of resources to change |
.Destructions | int | Number of resources to destroy |
.Imports | int | Number of resources to import |
.Summary | string | One-line plan summary |
.Resources | object | Resource lists by action type |
.Warnings | []string | Terraform warning messages |
Apply Template Variables
| Variable | Type | Description |
|---|---|---|
.Component | string | Component name |
.Stack | string | Stack name |
.Command | string | Terraform command (apply) |
.Success | bool | Whether apply succeeded |
.Summary | string | One-line apply summary |
.Resources | object | Resource lists by action type |
.Outputs | map | Terraform outputs |
.Warnings | []string | Terraform warning messages |
Example Custom Template
.atmos/ci/templates/plan.md
Built-in Templates
The default templates are embedded in the Atmos binary at pkg/ci/plugins/terraform/templates/.
You can use these as a starting point for customization.
Related
- CI Configuration - Full configuration reference
- Summary - Job summary configuration
- Comments - PR comment configuration
- Job Summaries - Summary format and template customization