Skip to content

datasciencecampus/update-tf-modules

Repository files navigation

update-tf-modules

A reusable GitHub Actions workflow that automatically opens pull requests to keep Terraform module versions up to date, for both GitHub-hosted and Terraform Registry modules.

Versioning

This project follows SemVer and publishes two tag types with different semantics:

  • vX.Y.Z (for example v1.4.2) is an immutable release point.
  • vX (for example v1) is a mutable channel tag that moves to the latest stable vX.Y.Z release.

Use @v1 to track the latest non-breaking updates, or pin to a full commit SHA for maximum reproducibility. See Consumer Setup for pinning strategies.

Quick Start

  1. Create a manifest at .github/update-modules-manifest.yml listing the modules to manage.
  2. Declare permissions — your workflow job needs contents: write and pull-requests: write.
  3. Call the workflow using the @v1 tag or a pinned commit SHA.
jobs:
  update:
    permissions:
      contents: write
      pull-requests: write
    uses: datasciencecampus/update-tf-modules/.github/workflows/update-tf-modules.yml@v1
    with:
      manifest_path: .github/update-modules-manifest.yml
      terraform_root: terraform
      create_pr: true

New here? The Getting Started Tutorial walks you through this step by step.

Documentation

Getting Started Tutorial Step-by-step: from zero to your first automated update PR
Consumer Setup Full integration guide, all inputs, outputs and pinning options
Manifest Schema Complete reference for the manifest file format
Architecture & Design How the tool works internally and why
Permissions & Troubleshooting Error diagnosis, token configuration and debugging

Troubleshooting

PR creation failed? Check your job permissions (need contents: write and pull-requests: write) and token scope. See Permissions & Troubleshooting.

Module updates not detected? Verify manifest syntax and file paths. See Manifest Schema for validation rules.

Something else? See Architecture & Design for how module types, version discovery and file scanning work.

About

A workflow to automate module updates in terraform projects

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages