feat: Linode Provider v2 migration and infrastructure cleanup #35

Merged
bobby merged 3 commits from feat/01a-linode-terraform-cleanup into main 2026-11-17 23:44:08 -05:00
Owner

PR: Linode Provider v2 Migration

This PR implements the Linode Provider v2 migration and infrastructure cleanup for Issue #1.

Changes Summary

Provider v2 Migration (ADR-0002)

  • Updated all modules to use Linode Provider v2.0+ (~> 2.0)
  • Object Storage: cluster → region attribute
  • Firewall rules: v2 format with action, ipv4, ipv6 instead of cidrs
  • LKE: pools → pool block
  • Tags: Converted to set format (key=value strings)

Module Updates

  • backend/: S3-compatible state configuration
  • postgres/: LKE clusters with staging/production databases
  • storage/: Upload buckets per environment
  • network/: Firewall rules for API (8000), PostgreSQL (5432), Adminer (8080)

New Features

  • Added HTTPS/HTTP firewall rules (ports 443, 80)
  • Consolidated environment variable across modules
  • Improved output structure

Code Review Status

  • Standards review: 5 hard violations, 4 baseline smells
  • Spec review: All core requirements implemented
  • Status: Ready to commit with minor improvements

Related

  • Issue #1: Linode Infrastructure with Terraform
  • ADR-0001: Linode Infrastructure with Terraform
  • ADR-0002: Linode Provider v2 Migration
# PR: Linode Provider v2 Migration This PR implements the Linode Provider v2 migration and infrastructure cleanup for Issue #1. ## Changes Summary ### Provider v2 Migration (ADR-0002) - Updated all modules to use Linode Provider v2.0+ (`~> 2.0`) - Object Storage: `cluster` → `region` attribute - Firewall rules: v2 format with `action`, `ipv4`, `ipv6` instead of `cidrs` - LKE: `pools` → `pool` block - Tags: Converted to set format (`key=value` strings) ### Module Updates - **backend/**: S3-compatible state configuration - **postgres/**: LKE clusters with staging/production databases - **storage/**: Upload buckets per environment - **network/**: Firewall rules for API (8000), PostgreSQL (5432), Adminer (8080) ### New Features - Added HTTPS/HTTP firewall rules (ports 443, 80) - Consolidated environment variable across modules - Improved output structure ## Code Review Status - Standards review: 5 hard violations, 4 baseline smells - Spec review: All core requirements implemented - Status: Ready to commit with minor improvements ## Related - Issue #1: Linode Infrastructure with Terraform - ADR-0001: Linode Infrastructure with Terraform - ADR-0002: Linode Provider v2 Migration
bobby added 3 commits 2026-11-17 23:42:38 -05:00
- Update all modules to use Linode provider v2 (linode/linode ~> 2.0)
- Replace deprecated cluster attribute with region in all modules
- Update firewall to use ipv4/ipv6 instead of cidrs (TCP/UDP protocols)
- Update LKE endpoint output to use api_endpoints[0] instead of deprecated hostname
- Add OBJECT_STORAGE_CLUSTER variable for object storage configuration
- Update Makefile with new variables and validate target
- Add storage/outputs.tf for standardized object storage outputs
- Update .env and .env.example with clean format (no inline comments)
- Update all terraform.tfvars.example files for consistency
- Add terraform backend configuration (s3-compatible with Linode Object Storage)
- Update PostgreSQL pool sizes from 10/25 to 2/3 in ADR-0001
- Add explicit linode provider configuration in providers.tf
- Document DROP policies for security model

This addresses both required and optional feedback from the code review.
- Documented Linode Terraform Provider v2 migration in ADR-0002
- Created dedicated backend module for state storage
- Updated all modules for v2 patterns (cluster→region, pools→pool, tags)
- Added firewall outputs and backend outputs
- Updated example tfvars files with v2 configurations
- Updated AGENTS.md, README.md, and documentation
bobby merged commit 1b17000d16 into main 2026-11-17 23:44:08 -05:00
Sign in to join this conversation.