Landing-zone Component (OpenTofu/Terragrunt)
Scaffolds a new component into nanohype/landing-zone. Produces the components/<cloud>/<name>/ Tofu root module (main.tf, variables.tf, outputs.tf, versions.tf) plus the live/_envcommon/<cloud>/<name>.hcl dependency-wiring file. Optionally adds a modules/tenant/ submodule for multi-tenant components (used by druid, pipeline, gateway, llm, mlops, rag, governance). Components target AWS, the org's cloud substrate.
| Name | landing-zone-component |
| Version | 0.1.0 |
| Category | infrastructure |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | opentofu, terragrunt, aws, landing-zone, nanohype |
| Source | templates/landing-zone-component |
Render it
Three front doors, one catalog. Pick whichever suits the caller.
# CLI
npx @nanohype/sdk render landing-zone-component --out ./my-app
# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "landing-zone-component", variables);
# MCP — from an agent
get_template({ name: "landing-zone-component" })Prerequisites
| Tool | Version | Why |
|---|---|---|
tofu | >=1.11.0 | OpenTofu CLI — never terraform |
terragrunt | >=0.59 | Drives the live/ env-specific overrides + dependency wiring |
tflint | — | Required by landing-zone's lint job — validates naming + documented variables/outputs |
Variables
Required
ComponentNamestring- Snake_case component name. Used as directory name and resource-prefix in tags. Must be lowercase snake_case starting with a letter.
Descriptionstring- What this component provisions (one sentence — appears in main.tf header + README + envcommon comment).
Optional
Multitenantbool — defaults tofalse- If true, adds a modules/tenant/ submodule and wires var.tenants + for_each in main.tf.
What it produces
8 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.
components/aws/__COMPONENT_NAME__/main.tf
components/aws/__COMPONENT_NAME__/modules/tenant/main.tf
components/aws/__COMPONENT_NAME__/modules/tenant/variables.tf
components/aws/__COMPONENT_NAME__/outputs.tf
components/aws/__COMPONENT_NAME__/variables.tf
components/aws/__COMPONENT_NAME__/versions.tf
live/_envcommon/aws/__COMPONENT_NAME__.hcl
README.mdComposes with
- Nests inside
monorepo