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

Wrong json output #24

Open
nabouzidan-3as opened this issue Aug 23, 2023 · 1 comment
Open

Wrong json output #24

nabouzidan-3as opened this issue Aug 23, 2023 · 1 comment

Comments

@nabouzidan-3as
Copy link

According to README, the conversion of

"output" "arn" {
  "value" = "${aws_dynamodb_table.basic-dynamodb-table.arn}"
}

will return

{
  "output": [
    {
      "arn": [
        {
          "value": "${aws_dynamodb_table.basic-dynamodb-table.arn}"
        }
      ]
    }, 
  ... rest of JSON truncated
  ]
}

This is not correct, the return value should be

{
  "output": {
      "arn": {
          "value": "${aws_dynamodb_table.basic-dynamodb-table.arn}"
        }
    }, 
  ... rest of JSON truncated
}

An HCL object is unnecessarily converted into a tuple.

@Acconut
Copy link
Collaborator

Acconut commented Aug 23, 2023

Similar errors have been reported many times (e.g. #4, #10). The problem is that the official HCL parser library that we use, does not produce the same output as you input because there are multiple serialized version for a given HCL file. This comment contains two links with more details: #4 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants