Terraform Agents

Building infrastructure-as-code agents: planning, validation, and apply loops.

8 articles

  1. 01

    Terraform for AI Agents (1): Why IaC Is the Only Sane Way to Ship Agents

    Agent systems are a moving target — new tools, new memory stores, new regions every month. Manual console clicks don't …

    26 min
  2. 02

    Terraform for AI Agents (2): Provider, Auth, and Remote State on OSS

    Pinning the alicloud provider, picking between AK/SK, AssumeRole, and ECS RAM role auth, putting tfstate on OSS with …

    30 min
  3. 03

    Terraform for AI Agents (3): A Reusable VPC and Security Baseline

    The first reusable module — a three-zone VPC with public/private subnets, NAT egress, security groups layered by tier, …

    30 min
  4. 04

    Terraform for AI Agents (4): Compute — ECS, ACK, or Function Compute?

    The three places an agent's main loop can live on Aliyun: a long-running ECS instance with pm2, a Kubernetes pod on ACK, …

    32 min
  5. 05

    Terraform for AI Agents (5): Storage — Vector, Relational, and Object Memory

    An agent has three kinds of memory and they map onto three Aliyun services: PolarDB/RDS for sessions, OpenSearch (vector …

    32 min
  6. 06

    Terraform for AI Agents (6): LLM Gateway and Secrets Management

    Centralise LLM API access through one gateway: per-agent quotas, request logging, and zero secrets outside KMS. …

    36 min
  7. 07

    Terraform for AI Agents (7): Observability, SLS Dashboards, and Cost Alarms

    Logs to SLS, traces to ARMS, metrics to CloudMonitor — all provisioned in HCL so a new env comes pre-instrumented. The …

    36 min
  8. 08

    Terraform for AI Agents (8): End-to-End — research-agent-stack in One Apply

    Stitching the seven modules into one repo, running terraform apply once, and watching a complete agent runtime — VPC, …

    38 min