amplify-education / python-hcl2

MIT License
238 stars 52 forks source link

Literal values are converted to arrays #18

Closed roni-frantchi closed 4 years ago

roni-frantchi commented 4 years ago

It's actually asserted on tests. So give the following ACL: https://github.com/amplify-education/python-hcl2/blob/f32041afa876fc322984b4b2da69f86d65040664/test/helpers/terraform-config/s3.tf#L3

I'd expect the ACL value to remain a string, but is converted to array in json. But it converted to an array: https://github.com/amplify-education/python-hcl2/blob/f32041afa876fc322984b4b2da69f86d65040664/test/helpers/terraform-config-json/s3.json#L9

And now Terraform cannot handle this file:

Inappropriate value for attribute "acl": string required.
SumGR commented 4 years ago

I think this is a duplicate of #6 ?

roni-frantchi commented 4 years ago

@SumGR looks like it. The “top level” part in the issue summary through me off - I think this is an issue for any literal value, at any level. I’ll close this one and track #6