apple / apple/pkl

Feature Request: Add `hcl` format

Open
#488 1 comment 25 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.