pltf focuses on faster, safer Terraform generation with predictable wiring. Deep dives live under docs/features/*.
Map of features
- Profiles & Defaults: org/user defaults (
modules_root,default_env, telemetry). - Validation & Lint: structural checks before render/apply.
- Backends:
s3|gcs|azurermstate backends, independent of target cloud. - Custom Modules: bring-your-own
module.yamlcatalog. - Placeholders & Wiring:
${env_name},${layer_name},${module.<id>.<output>},${parent.<output>},${var.<name>}. - Secrets: keep secrets out of specs; render as TF vars, not locals.
- Variables: env/service vars and CLI
--varoverrides. - Telemetry: opt-in/opt-out behavior.
Terraform generation and execution
- Render-only:
pltf generate -f <spec> --env <name> -o <dir>(no cloud creds required). - Generate + run Terraform:
pltf terraform plan|apply|destroy|output|graphregenerates code every time before invoking Terraform. - Outputs land under
.pltf/<env>/<layer>/...with providers, backends, modules, and outputs files.
Examples:
pltf generate -f example/env.yaml --env prod -o .pltf/example/env/prod
pltf terraform plan -f example/service.yaml --env prod
Variables, placeholders, links
- Reuse specs with
${env_name},${layer_name},${parent.<output>},${module.<id>.<output>},${var.<name>}. - Links let modules consume other module outputs without hand-wiring Terraform.
- CLI overrides:
--var key=valueaugment or replace spec variables.
Secrets
- Declare secret keys under
envRef.<name>.secrets; supply values via environment/CI secrets. - Rendered as Terraform variables to avoid embedding values in generated code.
Custom modules
- Run
pltf module init --path <module_dir>to scaffoldmodule.yaml. - Reference with
source: customand point--modulesor profilemodules_rootto your catalog.
Validation and lint
pltf validateruns structural checks before generation.- Terraform
plan/applyviapltf terraform ...always regenerates to reduce drift and catches wiring issues early.