amplify-education / python-hcl2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

One more "string into list" issue

nnsense opened this issue · comments

I'm having the same issue many other tickets are reporting, where this

description = "Ingress NLB address"

is converted into this

"description": [
  "Ingress NLB address"
]

Needless to say, terraform fails to deploy such json because a list in not expected:

Error: Unsuitable value type

The first bug reporting this is dated end of 2019, and it's pretty much a blocker for anyone trying to use the module's output with terraform, Unfortunately I've developed a whole script based on what this module was suppsed to do (I'm reading a tf file, updating the resulting json and writing back the file to deploy with terraform), this bug is making my script useless.

Temporarily sorted out by using the python hcl module, older but at least it isn't blindly converting everything into a list.

I believe this was fixed in 3.0.0. Feel free to reopen if you are still seeing this issue