question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Add Support for HCL Output

See original GitHub issue

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave “+1” or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Currently the output is JSON, but it would be great if we could output HCL. While we can use cd cdktf.out && terraform plan, but could see real value/interesting solutions created if the output was HCL.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:101
  • Comments:21 (12 by maintainers)

github_iconTop GitHub Comments

15reactions
JayDoubleucommented, Jul 21, 2020

Programmatically generating TF files and modules for future edits by users is one of potential use cases.

5reactions
JayDoubleucommented, Jul 22, 2020

The ability to produce HCL has many use cases, the human readable template generation is just one of them and yes it would look similar to react app generator you mentioned but I’m hoping cdktf is just the right tool for that already . What would make it even better is the ability to spit out HCL. 😉

Regarding the api itself and terragrunt, I’m aware of terragrunt however it’s just a wrapper around terraform which can be implemented in any language.

What i’m after is something similar to below:

app = App()
MyStack(app, "automate-everything")
synth = app.synth()
plan = app.plan(synth)

if plan.changes is not None:
    if len(plan.changes.module.custom.fruits) > 4:
       app.apply(synth, target='module.custom.fruits')
Read more comments on GitHub >

github_iconTop Results From Across the Web

Modules that add features to a theme | HCL Digital Experience
Modules that add features to a theme | HCL Digital Experience. Theme modules contribute resources, such as JavaScript, CSS and HTML, to a...
Read more >
Getting started configuring Packer with HCL2 files
The HCL language supports three different syntaxes for comments: # begins a single-line comment, ending at the end of the line. // also...
Read more >
Configuration Blocks and Attributes - Terragrunt
Terragrunt also supports JSON-serialized HCL in a terragrunt.hcl.json file: where ... This feature allows you to specify glob patterns of files that should ......
Read more >
hcl - Go Packages
An implementer of this function should at least support attribute and index steps. func DiagnosticExtra ¶ added in v2.13.0. func DiagnosticExtra[T any](diag * ......
Read more >
User defined HCL functions | Docker Documentation
Using interpolation to tag an image with the git sha · Using the add function · Defining an increment function ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found