-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Thanks a ton for exposing this functionality, it'll allow us to stop maintaining a local version of this library. Now onto the issue at hand!
@sarcasticadmin explained it best in this comment: open-policy-agent/conftest#266 (comment)
The overall issue is that when an HCL file has a single provider definition, the resulting JSON is just a single object.
"provider": {
"aws": { "version": "=2.46.0", "alias": "one" }
}But when an HCL file has multiple provider definitons of the same type, aliased, the JSON is turned into a set.
"provider" : {
"aws": [
{ "version": "=2.46.0", "alias": "one" },
{ "version": "=2.46.0", "alias": "two" }
]
}We would like to always return a set for the provider block for consistency.
Question being, do you agree with this approach as well and is something that hcl2json should do? If so, again would be more than happy to do a PR! Otherwise, we'll handle this specific conversion ourselves.
Context: open-policy-agent/conftest#266