A GCP infrastructure template using Terraform for multi-environment deployments with automated CI/CD pipelines.
- Automated preview environments for feature/bugfix/hotfix branches
- Terraform workspace isolation (dev, stage, prod, preview)
- Shared GCS backend for centralized state management
- GitHub Actions workflows for automated deployment
- Semantic versioning with conventional commits
- Docker image builds and publishing to GCP Artifact Registry
- Package publishing to GCP Artifact Registry (generic and Docker)
- Manual deployment workflows with approval gates
- Branch-based infrastructure provisioning and cleanup
- bash 3.2+
- mise - Dev tool and task runner
- Terraform 1.5+ (managed by mise)
- gcloud CLI
- GCP project with billing enabled
# Option 1: Nedavellir CLI
nv create your-project --template mise-app-template
# Option 2: GitHub template + scaffold
git clone <your-new-repo>
cd <your-new-repo>
mise run scaffold -- --project your-project# Install all dev tools and dependencies
mise install
# Configure GCP project details in mise.local.toml (optional local overrides)
cp mise.local.toml.example mise.local.toml
vim mise.local.toml
# Authenticate with GCP
mise run gcp-login
# Create Terraform backend (one-time)
mise run tf-create-backendmise run tf-init # Initialize Terraform
mise run tf-plan # Preview changes
mise run tf-apply # Apply changesList all available tasks:
mise tasksPush to feature/*, bugfix/*, or hotfix/* branches:
- CI runs tests, linting, formatting
- Builds Docker image tagged with issue ID
- Publishes pre-release package
- Creates isolated Terraform workspace
- Provisions preview infrastructure
- Deploys application
- Cleans up when PR is merged or branch deleted
Push to main branch:
- Analyzes conventional commits
- Bumps version and creates git tag
- Publishes package and Docker image
- Deploys to dev environment
- Creates GitHub Release
Deploy to stage/prod via GitHub Actions:
- Go to Actions → Manual Deployment
- Select version tag and environment
- Approve deployment (if required)
- User Guide - Complete setup and CI/CD workflow guide
- Architecture - System design and Terraform structure
- Infrastructure Guide - Infrastructure operations
- Development Guide - Developer workflows
Customize for your language:
# After scaffolding, install tools and customize Docker and package publishing
mise install
claude /adapt # Guided customization (requires Claude CLI)Update Dockerfile and mise-tasks/build-prod for your language/framework.