pltf module init
Generate a module.yaml from an existing Terraform module
Synopsis
Scan a Terraform module directory, read variables/outputs, and write a module.yaml descriptor. If module.yaml already exists at the destination it will be replaced. Use flags to override metadata such as name, type, description, or output path. Provider defaults to aws and version to 1.0.0.
Examples
# Generate module.yaml inside ./modules/aws_eks
pltf module init --path ./modules/aws_eks
# Write to a custom location and override name/type
pltf module init --path ./modules/db --name postgres --type aws_postgres --out ./modules/db/module.yaml
Options
--description string Human-readable description for the module; optional
--force Overwrite an existing module.yaml (backs up to module.yaml.bak-<timestamp> when absent)
-h, --help help for init
--name string Module name to write into module.yaml (defaults to directory name)
--out string Output path for module.yaml (defaults to <path>/module.yaml)
--path string Directory containing the Terraform module to inspect; defaults to current directory (default ".")
--type string Logical module type; defaults to the module name when omitted
Options inherited from parent commands
--telemetry Enable anonymous telemetry (usage metrics). Currently a stub/no-op unless enabled.
-V, --verbose Enable verbose logging
SEE ALSO
- pltf module - Helpers for working with Terraform modules