Convert: Keep sort order of attributes in input HCL #2688
Labels
enhancement
New feature or request
feature/convert
priority/awaiting-more-evidence
Lowest priority. Unlikely to be worked on unless/until it gets a lot more upvotes.
Community Note
Description
When using
cdktf convert
to translate HCL to CDKTF languages, the order of the properties is sorted alphabetically.However, this order might have a reason, especially in the case of documentation examples. In the example given below the
name
of the table is moved below the attributes whereas the more natural place to put it, would be at the top of the resource.This is only stylistic and does not change the behavior, but from my experience most Terraform config tends to put "global" properties such as "name" in this example at the top.
Example
Given the following HCL example
cdktf convert --language typescript --provider 'hashicorp/aws@~>4.53.0'
returns:References
The text was updated successfully, but these errors were encountered: