Terraform Not executing for Azure ARC template

I’m getting errors.

I am trying to execute Azure ARC terraform template through python.

refer - azure_arc/azure_arc_sqlsrv_jumpstart/aws/winsrv/terraform at main · microsoft/azure_arc · GitHub

Its working while execute usual init, apply with tf files and scripts.

But I prefer to execute this as json format as (.tf.json).

I am able to init successfully but apply doesn’t work as expected. Lot of script validation errors are coming.

I have used python-hcl2 to convert tf format json to create config files.

Some of the errors

Errors found on terraform apply

Incorrect attribute value type
Inappropriate value for attribute “template”: string required.
Single quotes are not valid. Use double quotes (") to enclose strings.
Expected the start of an expression, but found an invalid expression token.
This character is not used within the language.
Inappropriate value for attribute “name”: string required.
Inappropriate value for attribute “location”: string required.
Inappropriate value for attribute “content”: string required.
Inappropriate value for attribute “filename”: string required.
Inappropriate value for attribute “access_key”: string required.
Inappropriate value for attribute “region”: string required.
Inappropriate value for attribute “secret_key”: string required.

The tf to json conversion is done by python-hcl2 package.

versions used:
Terraform 0.14.2
python 2.7 and 3.6
python-terraform 0.10.1
python-hcl2

Any help would be appreciated!

Please check here

Raised by someone…The same issue I am facing…