Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Synthesis in HCL #3348

Closed
wants to merge 92 commits into from
Closed

feat: Synthesis in HCL #3348

wants to merge 92 commits into from

Conversation

mutahhir
Copy link
Member

@mutahhir mutahhir commented Dec 12, 2023

Related issue

Fixes #225

Description

Add support for CDKTF to synthesize code to HCL Terraform instead of just JSON. While we are trying to ensure that HCL generation is as good as the existing JSON synthesis, care is requested when using it as JSON synthesis is much better tested and robust.

In order to use HCL output, the --hcl flag can be passed on to the synth command (e.g. cdktf synth --hcl).

Warning

Please note that we currently don't erase / remove existing JSON files, so care has to be exercised when using both cdktf synth along with cdktf synth --hcl as terraform will try to use both files if present and that will cause problems.

Checklist

  • Ensure all tests pass
  • Add documentation section for HCL output
  • Add tests for --hcl flag
  • Add support for import block
  • Add breaking change changelog entry for removed backends

Missing features / Problems

  • Some keywords may be quoted when not necessary. e.g. when = destroy will be when = "destroy" within the provisioner block.
  • Overrides do not contain enough type information, so they may be rendered incorrectly. We try our best to find the right rendering, but it's not always possible.

mutahhir and others added 30 commits December 6, 2023 13:58
Signed-off-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Copy link
Contributor

github-actions bot commented Feb 9, 2024

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add Support for HCL Output
3 participants