arcadedb / terraform
CLAUDE.md1 starsChanged 5 months agoApache-2.0View on GitHub
Directory rules for the IaC. Inherits the root CLAUDE.md prime directives. Phase D: validate only — never apply. - landing-zone/ — org OUs + residency SCPs + baseline guardrail + per-geo state + SSO permission sets. Root config (has its own providers, incl. aws.eu/aws.us). - modules/network — 3-AZ private VPC + endpoints (no public DB). - modules/eks — regional cluster; per-AZ MNG for the stateful DB tier (AZ-pinned, tainted, autoscaling off), Karpenter for stateless, Pod Identity. - modules/cell — one…
In this repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- control-plane/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- helm/CLAUDE.mdCLAUDE.md
- add-cellSkill
- cell-capacity-reportSkill
- deprovision-tenantSkill
- dr-drillSkill
- incident-triageSkill
- migrate-schemaSkill
- new-adrSkill
- provision-tenantSkill
- restore-tenantSkill
- retire-cellSkill
- review-terraform-planSkill
- rotate-secretsSkill
- security-baseline-checkSkill
- tenant-erasureSkill
- tenant-usage-reportSkill
- upgrade-arcadedbSkill
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Residency: every module taking region also takes allowed_regions and a terraform_data precondition fails the plan if region ∉ …
- Very specific: line 25
No public DB: never set a security-group ingress for ports 2480/2424/2434/5432/6379/7687 with cidr_blocks = ["0.0.0.0/0"].
≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md — terraform/
Directory rules for the IaC. Inherits the root CLAUDE.md
prime directives. Phase D: validate only — never apply.
Module boundaries
landing-zone/— org OUs + residency SCPs + baseline guardrail + per-geo state + SSO permission sets. Root config (has its own providers, incl.aws.eu/aws.us).modules/network— 3-AZ private VPC + endpoints (no public DB).modules/eks— regional cluster; per-AZ MNG for the stateful DB tier (AZ-pinned, tainted, autoscaling off), Karpenter for stateless, Pod Identity.modules/cell— one ArcadeDB cell (namespace, gp3-KMS StorageClass, PDB, default-deny NetworkPolicy, governance, optional Helm release). The heart.modules/backup-dr— backup S3 (SSE-KMS + in-geo CRR + Object Lock) + AWS Backup.modules/observability— AMP + AMG + alerts + log groups + SNS→PagerDuty.environments/— one shared root config + atfvarsper geo/env. Validating it exercises the whole composition.
Hard rules (hooks + CI enforce)
- Residency: every module taking
regionalso takesallowed_regionsand aterraform_dataprecondition fails the plan ifregion ∉ allowed_regions. Never write an out-of-geo region literal (the OPA gate + SCP also catch it). - No public DB: never set a security-group ingress for ports
2480/2424/2434/5432/6379/7687 with
cidr_blocks = ["0.0.0.0/0"]. - Quorum: the cell module enforces prod
replicas >= 3+pdb_min_available >= 2. - Version floor: cell module enforces ArcadeDB tag
>= 26.4.1. - Encrypt everything: pass a KMS key to EBS/S3/Secrets/logs (no plaintext).
- Pin all versions in
versions.tf(floor>= 1.10).
State layout
S3 backend, SSE-KMS, versioned, per-geo bucket, S3-native locking
(use_lockfile=true, no DynamoDB lock table — ADR-0022). EU state in the EU
bucket, US state in the US bucket. Backend config is supplied per environment
via -backend-config (see environments/backend.tf).
Naming
kb-<geo>-<env>[-<role>] (e.g. kb-eu-prod, cell kb-eu-prod-std-01). Tags:
platform, geo, env, module, managed-by, residency-boundary.
How to run plan/apply (POST-APPROVAL only)
Via Spacelift (ADR-0020): stack graph landing-zone → network → eks → cell;
mandatory manual approval on prod / any geo-prod apply. Locally, plan only,
and run the review-terraform-plan skill before any approval — it flags a DB
SG opened to the world, a destroy of stateful resources, residency violations,
and KMS/role changes.
Validate (this is all we do in Phase D)
make tf-validate # init -backend=false + validate, every module + env
make tflint
make fmt-checkDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

