Pipery Terraform CD#

Reusable GitHub Action for Terraform CD with structured logging via Pipery.

GitHub Marketplace Version License: MIT

Usage#

name: CD
on:
  push:
    branches: [main]

jobs:
  cd:
    uses: pipery-dev/pipery-terraform-cd@v1
    with:
      project_path: .
    secrets: inherit

Pipeline steps#

init → plan → apply → drift detection → state management

Every step is logged to pipery.jsonl via psh and uploaded as a GitHub Actions artifact.

Inputs#

InputDescriptionDefault
project_pathPath to the Terraform root module..
config_filePath to the pipery config file..github/pipery/config.yaml
terraform_versionTerraform CLI version to use.latest
backend_configComma-separated backend config vars (key=val).``
var_filePath to a .tfvars file.``
working_directoryWorking directory for Terraform commands..
plan_onlyOnly run plan, do not apply.false
auto_approveSkip interactive approval of plan.true
destroyRun terraform destroy instead of apply.false
check_driftRun a post-apply plan to detect drift.true
skip_planSkip terraform plan step.false
skip_applySkip terraform apply step.false
skip_drift_checkSkip drift detection step.false
log_filePath to write the JSONL log file.pipery.jsonl

Observability#

Each run produces a pipery.jsonl file. Upload it as an artifact and inspect it with the Pipery Dashboard.

License#

MIT — see LICENSE.