Feature Request: Add `hcl` format
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
While Pkl currently supports various formats like `json` and `yaml`, direct output in `hcl` would be a powerful addition for Terraform users.
Although generating HCL through intermediary formats like YAML or JSON is technically possible using HCL's [yamldecode](https://developer.hashicorp.com/terraform/language/functions/yamldecode) and [jsondecode](https://developer.hashicorp.com/terraform/language/functions/jsondecode) functions, it introduces unnecessary complexity. Direct HCL output would significantly streamline the workflow for creating `.tfvars` files used in Terraform configurations.
This feature would eliminate conversion steps, reduce potential errors, and solidify Pkl's position as a valuable tool within the Terraform ecosystem.
See also #59
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by reviewing issue #59 and Pkl's existing JSON and YAML output behavior; done means direct HCL output suitable for Terraform .tfvars files without intermediary conversion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- terraform
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100