githubEdit

wrenchTechne

Techne provides the shared tooling that powers the entire platform: reusable GitHub Actions workflows, pre-commit hooks, development environments, and Codespaces.

Techne provides the shared tooling consumed by all platform teams. Changes to Techne repositories can have cross-team impact — all consumers pin to commit SHAs, so releases are coordinated when breaking changes are introduced.

Platform Repositories 🏗️

OpenTofu Workflows

The pt-techne-opentofu-workflowsarrow-up-right repository provides reusable GitHub Actions called workflows used by every IaC repository on the platform.

Three-Tier Workflow Pattern

All infrastructure repositories follow this deployment workflow:

Workflow
Trigger
Environment

sandbox.yml

Pull requests

Sandbox

non-production.yml

Merge to main

Non-Production

production.yml

After non-production succeeds

Production

Requirements

Each consuming repository must have these three GitHub Variables configured:

  • state_bucket — Cloud Storage bucket for remote state

  • state_kms_encryption_key — KMS key for state encryption

  • state_prefix — Path prefix within the bucket

Pre-Commit Hooks

The pt-techne-pre-commit-hooksarrow-up-right repository provides Go-based pre-commit hooks for OpenTofu:

Hook
Description

tofu-fmt

Rewrites OpenTofu files to canonical format (.tofu, .tf, .tfvars)

tofu-validate

Validates syntax and internal consistency without making remote API calls

tofu-test

Executes automated tests from .tftest.hcl files in the module root

circle-info

pre-commit run -a must be run after any change in any platform repository. Run pre-commit autoupdate --freeze once at the start of each session to update hook SHAs.

Development Setup

See Development Setup for the full guide. The setup script is maintained in pt-techne-development-setuparrow-up-right.

Last updated