Coder Social home page Coder Social logo

Converting JSON into tf data about json2hcl HOT 5 OPEN

kvz avatar kvz commented on June 26, 2024
Converting JSON into tf data

from json2hcl.

Comments (5)

jacksonp2008 avatar jacksonp2008 commented on June 26, 2024

I see the same thing. Exported automation package from Azure which contains template.json

$ json2hcl < template.json > template.tf
$ terraform init
There are some problems with the configuration, described below.

The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.

Error: Error parsing /ExportedTemplate-RG-ATM-KIT002/template.tf: At 8:10: no object keys found!

Either I am doing this incorrectly or it doesn't work. Looking at the output to template.tf, it doesn't appear to be terraform code.

Sure would be cool if this worked. The underlying question is why M$ doesn't support this natively on AZ.

from json2hcl.

Acconut avatar Acconut commented on June 26, 2024

Would you mind sharing the sections of your template.json which is responsible for this error?

from json2hcl.

jacksonp2008 avatar jacksonp2008 commented on June 26, 2024

I would more comfortable with sharing the AZ configs if I knew who you are. I'm sure you're awesome but this is a public forum.

Just do this:

  • Log into your AZ account'
  • pick a resource group
  • download the automation script

Doesn't work... well for me anyway

from json2hcl.

Acconut avatar Acconut commented on June 26, 2024

I can understand that you do not want to share your configuration publicly but maybe you are able to remove the confident information from it or provide a minimal example which triggers the error (Error: no object keys found!). I am sorry, but I don't have the time to sign up for an Azure account just to test this out.

from json2hcl.

jacksonp2008 avatar jacksonp2008 commented on June 26, 2024

try this
template.json.txt

from json2hcl.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.