# Terraform — simulation environment ([T4](../../../docs/00-glossary.md#t4--dev)) Sim fleet + observability on k3d. Cluster from [`../../ansible/sim-cluster.yml`](../../ansible/sim-cluster.yml). Executable [T4](../../../docs/00-glossary.md#t4--dev) miniature ([06 — Environments](../../../docs/06-environments.md)). | Resource | Purpose | | --- | --- | | StatefulSet `drone` × `drone_count` | Virtual drones; pod names → `DRONE_ID`; shared `/data` lake | | Deployment `exporter` | Prometheus exporter reading lake with DuckDB | | Deployment `explorer` + NodePort 30088 | Partition tree + read-only SQL (prototype live mode) | | Deployment `prometheus` + NodePort 30990 | Scrapes exporter | | Deployment `grafana` + NodePort 30300 | Dashboard JSON from ConfigMap | ## Usage ```bash ansible-playbook ../../ansible/sim-cluster.yml # once: cluster + image terraform init terraform apply terraform output # URLs ``` Scale without YAML edits: ```bash terraform apply -var drone_count=9 -var speedup=4 ``` ## Notes - `image_pull_policy = "Never"` — image imported by Ansible (`k3d image import`); no registry pull. Air-gap mirror. - Pod name → identity (StatefulSet ordinal). `kubectl delete pod` = power cycle: new process, same identity, new flight ID. - Local state only — cluster disposable.