Skip to content

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.

Namelanding-zone-component
Version0.1.0
Categoryinfrastructure
LicenseApache-2.0
Personaengineering
Tagsopentofu, terragrunt, aws, landing-zone, nanohype
Sourcetemplates/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

ToolVersionWhy
tofu>=1.11.0OpenTofu CLI — never terraform
terragrunt>=0.59Drives the live/ env-specific overrides + dependency wiring
tflintRequired by landing-zone's lint job — validates naming + documented variables/outputs

Variables

Required

ComponentName string
Snake_case component name. Used as directory name and resource-prefix in tags. Must be lowercase snake_case starting with a letter.
Description string
What this component provisions (one sentence — appears in main.tf header + README + envcommon comment).

Optional

Multitenant bool — defaults to false
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.md

Composes with