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

CLI: Missing --hcl option for cdktf deploy #3582

Open
1 task
garysassano opened this issue Apr 4, 2024 · 3 comments
Open
1 task

CLI: Missing --hcl option for cdktf deploy #3582

garysassano opened this issue Apr 4, 2024 · 3 comments
Labels
enhancement New feature or request new Un-triaged issue ux/cli

Comments

@garysassano
Copy link

Expected Behavior

Currently, it's not possible to directly deploy your CDKTF application from the CLI if you're using the HCL output.

You're left with two options:

  • cdktf deploy, but you get JSON output
  • cdktf synth --hcl followed by cdktf deploy --skip-synth, but you need to use two commands

It should be possible to execute cdktf deploy --hcl directly.

Actual Behavior

See above.

Steps to Reproduce

See above.

Versions

0.20.5

Providers

No response

Gist

No response

Possible Solutions

No response

Workarounds

No response

Anything Else?

No response

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

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
@garysassano garysassano added bug Something isn't working new Un-triaged issue labels Apr 4, 2024
@DanielMSchmidt DanielMSchmidt added enhancement New feature or request ux/cli and removed bug Something isn't working labels Apr 8, 2024
@DanielMSchmidt
Copy link
Contributor

Could you expand on why the format is important to you? The content of both versions should be the same, so if you deploy right away there should be no difference between the JSON and HCL from Terraforms point of view.

@garysassano
Copy link
Author

It would be useful for validating the resulting configuration when debugging, since HCL is easier to read for a human.

@oieduardorabelo
Copy link

sharing my notes here:

another thing I noticed,

tools like aquasecurity/trivy, aquasecurity/tfsec and bridgecrewio/checkov

they all work better with HCL than with JSON

in my case, i do execute cdktf synth --hcl and cdktf deploy --skip-synth separately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new Un-triaged issue ux/cli
Projects
None yet
Development

No branches or pull requests

3 participants