terraform-exec icon indicating copy to clipboard operation
terraform-exec copied to clipboard

tfexec Validate returns non verbose error in tf-json object

Open neox8 opened this issue 4 years ago • 1 comments

Hello there,

I'm new into this tfexec , so hopefully could get some pointer ;

I'm just testing out the latest version of tfexec with terraform v1.1.6 and experimenting this with Validate function against a sample Terraform code which is expected to returns an Error

The returns looks like this

[{error Unexpected comma after argument Argument definitions must be separated by newlines, not commas. An argument definition must end with a newline. 0xc000209f00 0xc000316320}]

Is it possible to get a verbose version of the output please? IE if I do a validate in usual Terraform binary, I got this

╷ │ Error: Unexpected comma after argument │ │ on main.tf line 27, in data "aws_iam_policy_document" "kms": │ 27: policy_id = "${account}-${policy_name}-kms-policy", │ │ Argument definitions must be separated by newlines, not commas. An argument definition must end with a newline.

thanks!

neox8 avatar Feb 22 '22 20:02 neox8

sorry, should have look into it and use JSONMarshall

neox8 avatar Feb 24 '22 08:02 neox8