terradart_codegen
Maintainer tooling for terradart. Parses terraform providers schema -json (plus optional Magic Modules YAML overlays) into a unified provider IR and emits typed Dart factory wrappers for terradart_google.
This package ships the terradart CLI for maintainers and contributors curating the committed factories:
terradart wrap— regenerate curated factory wrappers fromwrapper_overrides/yaml/. Run with--checkin CI to verify byte-identical output.terradart wrap-init— scaffold a new wrapper override YAML from schema + MM hints.terradart wrap-promote— proposeenum_valuesanddartTypeOverridesblocks for human review.
End users depend on terradart_google directly; they do not run generation locally. Missing resources are curation requests (open a feature issue).
Installation
Activate on the same minor line as your workspace when working on the repo:
dart pub global activate terradart_codegen ^0.21.x
Check pub.dev for the latest patch.
Maintainer quickstart
From packages/terradart_codegen/:
dart run bin/terradart.dart wrap \
--provider hashicorp/google \
--source test/fixtures/wrap/source \
--output ../terradart_google/lib/src
# CI parity check (no writes):
dart run bin/terradart.dart wrap \
--provider hashicorp/google \
--source test/fixtures/wrap/source \
--output ../terradart_google/lib/src \
--check
The --source directory must contain schema.json and may include mm/<resource>.yaml overlays.
For the runtime side (Stack, Resource, Stack.synth / Stack.writeTo), see terradart_core. For the curated GCP factories consumers import, see terradart_google. For project-level documentation see the terradart repo README.
Libraries
- terradart_codegen
- Maintainer tooling for terradart curated factories.