title: How to assign a JSON file as STEP in an EMR cluster in Terraform?
body: <p>I'm building an EMR cluster in Terraform and in the STEP argument i want to load a JSON file that describes the list of steps.</p>
  
  <p>I tried this in my main.tf : </p>
  
  <pre><code>ressource "aws_emr" "emr" {
    ...
    ...
    step = "${data.template_file.steps.rendered}"
  }
  
  data "template_file" "steps" {
    template = "${file("${path.module}/steps.json")}"
  }
  </code></pre>
  
  <p>And this is the JSON file : </p>
  
  <pre><code>[
  {
      "action_on_failure" : "CONTINUE",
      "name"              : "step_name",
      "hadoop_jar_step" : {
          "jar" : "command-runner.jar",
          "args" : [
              "spark-submit",
              "s3://mybucket/src/pyspark/script1.py",
              "1",
              "68465131321321",
              "s3://mybucket/parquet",
              "s3://mybucket/result",
              "321",
              "65165165468587",
              "654"
          ]
      }
  }
  ]
  </code></pre>
  
  <p>But when i do <code>terraform plan</code> i got this error : </p>
  
  <blockquote>
    <p>Inappropriate value for attribute "step": list of object required.</p>
  </blockquote>
  
  <p>What's the problem ? </p>
  
  <p>Thanks for your help.</p>